Skip to content
⌘ NSIS Forum Archive

32 vs 64 bit SYSDIR - need some help/explanation

6 posts

Brummelchen#

32 vs 64 bit SYSDIR - need some help/explanation

myself actually works on 32bit - so all tools are working with $sysdir.

But i am not sure about 64bit.

is it "\system64" instead "\system32" or "\sysWOW64" found here?
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


i write on a portable defragger which is available as x86 and x64.

contains $sysdir the correct path for both?

how to determine 32 or 64 bit?

WOW64???
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


Application is for WinXP and Vista.

thx

PS registry in the work too, is this needed?
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
kichik#
system32 is for 64-bit files and syswow64 is for 32-bit files. $SYSDIR points to them both and where it actually writes is affected by file-system redirection. x64.nsh contains macros to handle the redirection.
kichik#
That'd be $SYSDIR with redirection on. With redirection turned on (the default), files written to system32 are actually written to syswow64.
Spilly#
This presents a problem when using $SYSDIR for file paths, like in shortcut creation.

Changing the redirection has no effect on the SYSDIR var, it's always "$WINDIR\system32", but if you install a 32-bit file in SysWOW64:

EnableX64FSRedirection
SetoutPath $SYSDIR
File 32bit.dll
CreateShortcut "$SMPROGRAMS\32bit.lnk" "$SYSDIR\32bit.dll"

the shortcut will be broken. Since you can't modify the $SYSDIR variable, it has become unusable for all binaries stored in SysWOW64.
Animaether#
Linking this thread to:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.

Forums > Developer Center > NSIS Discussion > Copying 64-bit DLL to SYSDIR on W7-64

Edit: not related to your shortcut issue, I'm afraid - just noting that thread as this is one of the first ones to pop up in google, and that thread has some updated information on disabling filesystem redirection currently not yet implemented in the x64.nsh header file.