|
|
|
|
#1 |
|
Junior Member
|
I have tried these three different commands to write a file to the C:/Windows/System32/ directory under WinXP x64.
InstallDir "C:\windows\system32" ; Won't work with 9x InstallDir "$WINDIR\system32" ; Won't work with 9x InstallDir "$SYSDIR" Every single time it will write the file to the C:\Windows\WOW64\ directory (only on x64 machines, not XP/2003/9x). I figure it is a self protection measure by Windows x64 to keep 32-bit software from mingling with the 64-bit software. I'm trying to make a program that installs the system OEM info, in the system properties box. This costists of two files, "oeminfo.ini" and "oemlogo.bmp", and they must be placed in the system directory (C:\Windows\System\ on 9x, and C:\Windows\System32\ on XP\2000\2003\x64). Any help or ideas how to circumvent this? |
|
|
|
|
|
#2 |
|
Junior Member
|
Some more info from Microsoft's site:
http://www.microsoft.com/windowsxp/u...el_x64faq.mspx Q. What is the SysWOW64 directory? A. The \Windows\SysWOW64 directory is where 32-bit system files are installed. 64-bit system files are in the \Windows\system32 directory for compatibility reasons. Q. Why do some of my programs install into the Program Files Directory, and others into the Program Files (X86) directory? A. Windows XP Professional x64 Edition redirects the \Program Files directory for all programs that are 32-bit during the installation to the \Program Files(x86) directory. Programs that 64-bit are installed into the \Program Files directory. More here too: http://www.sysinternals.com/blog/200...t-windows.html Windows 2003 SDK API to turn redirect off: http://msdn.microsoft.com/library/de...edirection.asp Last edited by guido666; 6th February 2006 at 03:47. |
|
|
|
|
|
#3 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
You can call Wow64DisableWow64FsRedirection using the System plug-in:
code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#4 |
|
Junior Member
|
Cool, so do I just call that, then call the enable function again to put it back?
|
|
|
|
|
|
#5 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Yes, that should work. Just make sure you call it before $SYSDIR is actually parsed. In InstallDir's case, that's impossible. InstallDir is parsed before any of your code is executed. You'd have to call this in .onInit, copy $SYSDIR into $INSTDIR (using StrCpy) and then call the enable function.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#6 | ||
|
Junior Member
Join Date: Jul 2006
Posts: 30
|
Quote:
From MSDN documentation: Quote:
|
||
|
|
|
|
|
#7 |
|
Junior Member
Join Date: May 2008
Posts: 7
|
This is not working for me, using System::Call "kernel32::Wow64DisableWow64FsRedirection(*i)"
Is there any way to get a return value from this instruction? documentation says the function returns a bool. Is there a way to tell if there is an error in the syntax? |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: May 2008
Posts: 7
|
I got it working, i don't know what stupid thing I must have been doing before. It also works with simply:
System::call "kernel32::Wow64DisableWow64FsRedirection()" |
|
|
|
|
|
#9 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
You can also use the macros in x64.nsh, which is included with the current NSIS releases.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|