Go Back   TechArena Community > Technical Support > Computer Help > Windows XP > Windows x64 Edition
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



SysWow64 Redirection for cmd.exe

Windows x64 Edition


Reply
 
Thread Tools Search this Thread
  #1  
Old 31-05-2009
Member
 
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??

Reply With Quote
  #2  
Old 31-05-2009
Member
 
Join Date: May 2006
Posts: 2,321
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.
Reply With Quote
  #3  
Old 31-05-2009
Member
 
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
Reply With Quote
  #4  
Old 01-06-2009
Member
 
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?"
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > Windows x64 Edition
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "SysWow64 Redirection for cmd.exe"
Thread Thread Starter Forum Replies Last Post
SysWOW64 folder Nimmee Windows x64 Edition 2 05-09-2012 02:09 PM
Need help in removing trojan from SysWOW64\srrstr.dll Shoana Networking & Security 6 06-03-2012 02:22 PM
Windows 7 64 bit: Spoolss.dll missing on SysWOW64 folder Maggie Q Operating Systems 3 12-12-2010 10:02 AM
Windows Vista 64 bit : What is SysWOW64 ? Seraphim Operating Systems 4 14-09-2009 05:09 PM
Virus sysWOW64 TotalWarriorWC3 Vista Help 6 12-05-2009 02:40 AM


All times are GMT +5.5. The time now is 05:28 AM.