Jump to content
Sign in to follow this  
ffdshow

Disable redirection mechanism in Windows XP x64

Recommended Posts

ffdshow

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

Share this post


Link to post
Share on other sites
Richard Robertson

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

Share this post


Link to post
Share on other sites
ffdshow

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.

Share this post


Link to post
Share on other sites
Richard Robertson

I'm afraid I'm not sure of how to do that. You know you can compile 64 bit AutoIt scripts though.

Share this post


Link to post
Share on other sites
ProgAndy

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

Share this post


Link to post
Share on other sites
ffdshow

Your code is not correct. It should be

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

Share this post


Link to post
Share on other sites
Richard Robertson

What do you mean by "not working"?

Share this post


Link to post
Share on other sites
ffdshow

What do you mean by "not working"?

I mean that the redirection mechanism is not disable with ProgAndy's code and my files still goes

to %programfiles(x86)% instead of %programfiles% using the script compiled in x86 flavor.

Share this post


Link to post
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
Sign in to follow this  

×