Results 1 to 4 of 4

Thread: SysWow64 Redirection for cmd.exe

  1. #1
    Join Date
    Sep 2004
    Posts
    87

    SysWow64 Redirection for cmd.exe

    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??

  2. #2
    Join Date
    May 2006
    Posts
    2,335

    RE: SysWow64 Redirection for cmd.exe

    32-bit applications is capable of accessing native system directory by substituting %windir%\Sysnative for %windir%\System32. Actually Sysnative is recognized by WOW64 as a special alias so that the file system doesnt redirect the access. Sysnative is kind of virtual directory, it's alias or pseudo-directory do not appear in Windows Explorer, directory listing. It doesn't even support native 64-bit processes that access %windir%\System32 folder. Sysnative cannot be used in applications user interface, it can only be used in file system calls.

  3. #3
    Join Date
    Sep 2005
    Posts
    156

    Re: SysWow64 Redirection for cmd.exe

    Copying qwinsta.exe from c:\Windows\System32 to c:\Windows\SysWOW64 doesn't seem to be a better idea. SysWOW64 is not meant for containing 64-bit executable. Anyways you can check out this "Programming Guide for 64-bit Windows" and this "Running 32-bit Applications". There are some API functions for disabling redirection temporarily and reverting redirection back after that. You can use below things:
    • Disable redirection
    • Call the utility
    • Revert redirection back

  4. #4
    Join Date
    Sep 2004
    Posts
    87
    I am not sure if qwinsta.exe _is_ a 64-bit executable or not, It has been installed in my system as a part of the Terminal Services support. Everything is going in to \System32 directory, so my questions still stands "Is there any other method of detecting a Remote Desktop session without resorting to the qwinsta.exe command line?"

Similar Threads

  1. SysWOW64 folder
    By Nimmee in forum Windows x64 Edition
    Replies: 2
    Last Post: 05-09-2012, 02:09 PM
  2. Need help in removing trojan from SysWOW64\srrstr.dll
    By Shoana in forum Networking & Security
    Replies: 6
    Last Post: 06-03-2012, 03:22 PM
  3. Windows 7 64 bit: Spoolss.dll missing on SysWOW64 folder
    By Maggie Q in forum Operating Systems
    Replies: 3
    Last Post: 12-12-2010, 11:02 AM
  4. Windows Vista 64 bit : What is SysWOW64 ?
    By Seraphim in forum Operating Systems
    Replies: 4
    Last Post: 14-09-2009, 05:09 PM
  5. Virus sysWOW64
    By TotalWarriorWC3 in forum Vista Help
    Replies: 6
    Last Post: 12-05-2009, 02:40 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,652,252.31956 seconds with 17 queries