DVDK
28th May 2003 21:24 UTC
system and system32
I want to copy some files to the system folder and system32 folder on a WinXP system with a modern NSIS.
Something.dll should be installed in system32 folder.
Somethingelse.dll should be installed in system folder.
I therefore write:
SetOutPath "$SYSDIR\"
File "Something.dll"
SetOutPath "?" :igor:
File "Somethingelse.dll"
...But which path can I use for the system folder? (Somethingelse.dll)
Afrow UK
28th May 2003 21:50 UTC
How about:
SetOutPath "$WINDIR\system"
File "Something.dll"
SetOutPath "$WINDIR\system32"
File "Somethingelse.dll"
kichik
29th May 2003 10:28 UTC
I think it'll be a better idea to keep $SYSDIR and not use $WINDIR\System32 to make sure you get the right value. As for getting C:\Windows\System without assuming the directory name, I am sorry but I have no idea.
nilpo
30th May 2003 16:12 UTC
XP System folders
On a windows XP system the system folder is defined in the registry
(HKLM\Software\Windows\CurrentVersion\)
The default value for Windows XP is System32. $SYSDIR will return the value of this regisrty entry at the time of execution.
So I would use:
$SYSDIR for System32, and
$WINDIR\System for the System folder
In the event that the system32 folder was changed to a different value the installer would still install to the Windows system directory. (So it could be possible to return the same value for both, however, this would insure that the installed program would function no matter how the user's system was set up.)
P.S. Using this set-up would also help make your installer cross-platform compliant if that is an issue.
For questions or comments about this post, please contact me.