noemig
6th February 2012 20:43 UTC
Copying some files from the installation directory to SysWow64 or system32
Hello,
I am trying to copy some files from the installation directory to SysWow64 or system32, depending is the OS is 32 or 64.
The code is written as :
Section "DLL"
${If} ${RunningX64}
SetOutPath "$WINDIR\SysWOW64"
DetailPrint "Installer running on 64-bit host"
File /r "DFORMD.DLL"
File /r "DFORRT.DLL"
File /r "Expsrv.dll"
File /r JETCOMP.exe
${Else}
SetOutPath "$WINDIR\System32"
File /r "DFORMD.DLL"
File /r "DFORRT.DLL"
File /r "Expsrv.dll"
File /r "JETCOMP.exe"
${EndIf}
SectionEnd
The installer is copying the entire folder that contains those DLL from the installation directory to SYSWOW64 or System32.
Can somebody give me a clue on how to solve this ?
Thanks.
noemig
msroboto
6th February 2012 21:33 UTC
Are you resetting the outputpath after doing this?
If not whatever files you lay down will go there.
noemig
6th February 2012 22:36 UTC
Copying some files from the installation directory to SysWow64 or system32
Yes, I am resetting the outhpath using the instruction SetOutPath .
The issue that I am facing is is that instead of copying the dll from the installation directory to the indicated folder. The installer is copying the entire folder where the dll files are located to the indicated folder ($WINDIR\SysWOW64 or $WINDIR\System32).
Thanks for your reply.
noemig
demiller9
6th February 2012 23:08 UTC
Why do you use the /r switch?
noemig
6th February 2012 23:23 UTC
The installer have to find the files between the folders directories.
Anders
7th February 2012 00:34 UTC
Installing files in %windir% is evil, don't do it please!
If you always want to install files in the 32bit system32 folder you can just pretend that x64 does not exist and just install in $sysdir and the windows filesystem redirection will take care of the rest...
noemig
7th February 2012 01:58 UTC
Copying some files from the installation directory to SysWow64 or system32
Thank you, I will try to install them on the $sysdir. Can you give me a hint why the installer is copying the entire folder instead of the corresponding files?
MSG
7th February 2012 08:23 UTC
Originally posted by noemig
Thank you, I will try to install them on the $sysdir. Can you give me a hint why the installer is copying the entire folder instead of the corresponding files?
This is because you're using the /r switch. You can read about it here:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.5noemig
7th February 2012 17:01 UTC
Copying some files from the installation directory to SysWow64 or system32
Now I understand. Thank you for your reply