I have been trying to call 'qwinsta.exe' utility via command line using 32-bit application for detecting Remote Desktop connection. My problem is that when i invoke 'cmd.exe /s qwinsta /server' it is launching c:\Windows\SysWOW64\cmd.exe and is not able to find 'qwinsta.exe' as it is installed in c:\Windows\System32. I have tried copying qwinsta.exe from c:\Windows\System32 to c:\Windows\SysWOW64 and manifest qwinsta.exe.mui from the \en-US subfolder of \System32 to the same subfolder of \SysWOW64\ in order to get the command working. I want to know if the workaround that i have tried is safe or not?? Is there any other method of detecting a Remote Desktop session without resorting to the qwinsta.exe command line? Any ideas??
Bookmarks