Wow64DisableRedirection


 

Wow64DisableRedirection

 

Disables 64 bit file system redirection.

 

On 64 bit versions of Windows the Windows\System32 folder is reserved for 64 bit applications.  32 bit versions of DLLs and applications are stored in Windows\SysWOW64.  By default when a 32 bit process such as Macro Scheduler attempts to access a system resource it will be automatically redirected to the SysWOW64 folder to load the 32 bit resource.  Even though you may explicitly declare "C:\Windows\System32" in a file operation the operating system will divert the call to the SysWow64 folder.

 

Usually this is desirable (32 bit processes cannot load 64 bit DLLs) and there are 32 bit equivalents for almost all system functions.

 

However there may be occasions where a 32 bit equivalent does not exist and you explicitly want to execute a 64 bit system process.  So you may want to disable 64 bit file system redirection.  You can do this with the Wow64DisableRedirection command. But use it carefully and be sure to re-enable redirection immediately afterwards.  Failing to do that could cause instability as it may prevent Macro Scheduler from loading a system DLL and therefore cause loss of functionality.

 

For more information refer to the Microsoft documentation at:

http://msdn.microsoft.com/en-us/library/aa384187(v=vs.85).aspx

 

A safer way to force access to the System32 folder is to refer to the SYS_NATIVE variable.  E.g. the following will run the 64 bit version of Notepad:

 

Run>%SYS_NATIVE%\Notepad.exe

 

Using SYS_NATIVE is the safest way to bypass file system redirection.

 

See also: Wow64EnableRedirection