Jump to content

Disable redirection mechanism in Windows XP x64


Recommended Posts

I use a script compiled in 32 bit OS which copy some files to Program Files dir.

In XP x64 the files are copied to C:\Program Files (x86) instead of C:\Program Files. I used

DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)

to disable the redirection mechanism, but didn't work. The question is: can I use a

script compiled in 32 bit mode which work in 64 bit environment?

Edited by ffdshow
Link to comment
Share on other sites

32 bit applications can be run in a 64 bit environment, but you cannot load dlls of the wrong type.

I know they are working in 64 bit environment, but how can I copy those files to C:\Program Files by-passing the redirection mechanism? The files are copied to C:\Program Files (x86) instead of C:\Program Files. Thanks.
Link to comment
Share on other sites

Your code is not correct. It should be

$OldValue = DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "ptr*", 0)
If Not @error Then $OldValue = $OldValue[1]
Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...