Old 3rd April 2010, 15:44   #1
cascadtx
Junior Member
 
Join Date: Apr 2010
Posts: 3
64-Bit Registry Read + Manifest (Dummy Needs Help!)

After reading dozens of posts in this forum and looking through the NSIS documentation, I have a problem I can't seem to solve. Very simply, I have an application that was written for 32-bit installation and now desire to install under 64-bit O/S (Win 7) as well. The code below works fine under 32-bit XP, but does not work under 64-bit Win7:

StrCpy $Acad "SOFTWARE\Autodesk\AutoCAD\R18.0\ACAD-8001:409"
ReadRegStr $5 HKLM $Acad "ProductName"
MessageBox MB_OK "Acad = $Acad 5 = $5"
StrCpy $Acad "SOFTWARE\Microsoft\Windows\CurrentVersion"
ReadRegStr $5 HKLM $Acad "ProductName"

Actually, I am able to read the Windows current version under either and that makes it all the more mysterious to me. I would think that simply inserting 'SetRegView 64' before this code would make it work fine in 64-bit, but that doesn't seem to do the trick.

Also, I'm not finding lots of help on the manifest. Is it really just that I need to use NotePad to create a file named 'MyInstaller.exe.manifest' according to the format noted in http://msdn.microsoft.com/en-us/library/bb756929.aspx and place in the same folder as my NSIS installer exe?

Like I said, kind of feeling like a dummy right now. Thanks in advance for any help offered.
cascadtx is offline   Reply With Quote
Old 3rd April 2010, 20:52   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,888
Put RequestExecutionLevel in your script, that will create the manifest

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 6th April 2010, 13:00   #3
cascadtx
Junior Member
 
Join Date: Apr 2010
Posts: 3
I tried putting 'RequestExecutionLevel admin' in the Application section and got an error. On the plus side, I've gotten past the registry problems using SetRegView 64. I had tried putting this in .oninit and still had problems, but they may have been related to some other things happening on the machine. Now, I'm using it right before I read the registry in each function and things are working OK. The WinVer.nsh and x64.nsh includes also worked magic in my app.
cascadtx is offline   Reply With Quote
Old 6th April 2010, 13:59   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,888
well, you still should put RequestExecutionLevel in your script, just put it as the first line in your script

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
64-bit, manifest, registry

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