Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WIndows/Twapi device notifier for volumes forwarded to a remote session

27 views
Skip to first unread message

Harald Oehlmann

unread,
Jul 19, 2017, 1:16:30 PM7/19/17
to
I used happily TWAPI device notification to get informed about new
inserted USB sticks:
twapi::start_device_notifier Cmd -deviceinterface volume

Now I am in awindows remote desktop session with forwarded drives.

When I insert an USB Stick in the client, I get on the desktop all the
"New drive E:" messages (Windows 10).

But I don't get a notification within the upper notifier.

Apparently, this is by windows design.
I spyed the windows application - no windows messages
"WM_DEVICECHANGE" for this case.

Does anybody know a way how to get a notification also in this case ?

Thank you all,
Harald

Harald Oehlmann

unread,
Jul 19, 2017, 3:10:58 PM7/19/17
to
Well - more investigation - it is not a drive letter like "E:" on the
mapped server side. It is "\\tsclient\e" for mapped terminal drive
letter "e".

And the message "New USB Drive" in WIndows 10 came from the client
computer and is not within the session - this miss-lead me to the
assumption that it is a drive letter.... The message overlayed the
full-screen session....

This post tells how to enumerate this on the C level:
http://www.44342.com/Windows-Terminal-Services-f1018-t1029-p1.htm

I will try it now.

Second challenge is to eject the USB Stick on the terminal from the
program running in remote - we will see.

Thanks,
Harald

0 new messages