Old 17th October 2010, 03:40   #1
Majek
Junior Member
 
Join Date: Oct 2010
Posts: 9
Cool Newb SetRegView question

Hello, I'm writing an application in C# with the platform target AnyCPU. On x86 machines the app runs as 32-bit and on x64 it runs as 64-bit. This way I only need a single installer instead of a separate one for x64.

My install script uses x64.nsh and changes the InstallDir in the .onInit function:

${If} ${RunningX64}
StrCpy $instdir "$PROGRAMFILES64\MyApplication"
${EndIf}

My question is, is there any other changes I need to make to the script for x64 machines? I've read about the SetRegView function but I don't know when and where to use it.
Majek is offline   Reply With Quote
Old 17th October 2010, 05:52   #2
redxii
Senior Member
 
Join Date: Nov 2005
Posts: 115
If you create any registry entries in the installer that your program depends on to read/set then on 64-bit you should use 'SetRegView 64'. Like so..

SetRegView 64
WriteRegStr $INSTDIR HKLM Software\NSIS ""
SetRegView 32

Otherwise if they are just keys the installer/uninstaller uses (like uninstall information for add/remove programs or figuring out where the program was installed) then it doesn't really matter since your program won't care about them. SetRegView won't affect a 32-bit system so it shouldn't be necessary to use ${if} ${runningx64}.
redxii is offline   Reply With Quote
Old 17th October 2010, 06:39   #3
Majek
Junior Member
 
Join Date: Oct 2010
Posts: 9
Thanks for the quick response! My app doesn't depend on any registry keys so I think I'll leave SetRegView alone for now. Thanks again
Majek is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump