ffdshow Posted April 17, 2009 Posted April 17, 2009 (edited) 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 April 17, 2009 by ffdshow
Richard Robertson Posted April 17, 2009 Posted April 17, 2009 32 bit applications can be run in a 64 bit environment, but you cannot load dlls of the wrong type.
ffdshow Posted April 17, 2009 Author Posted April 17, 2009 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.
Richard Robertson Posted April 17, 2009 Posted April 17, 2009 I'm afraid I'm not sure of how to do that. You know you can compile 64 bit AutoIt scripts though.
ProgAndy Posted April 17, 2009 Posted April 17, 2009 (edited) Your code is not correct. It should be $OldValue = DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "ptr*", 0) If Not @error Then $OldValue = $OldValue[1] Edited April 17, 2009 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
ffdshow Posted April 18, 2009 Author Posted April 18, 2009 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.
ffdshow Posted April 19, 2009 Author Posted April 19, 2009 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now