Old 20th May 2008, 17:21   #1
Irish2007
Junior Member
 
Join Date: Nov 2007
Posts: 4
NSIS Error: Error launching installer

I have an installer that asks the user if they wish to uninstall the previous version of this application. When they click "Yes" they get the popup error "NSIS Error: Error launching installer". There is no other information. If they click OK the uninstaller continues without any problems.

If they run the uninstaller from the shortcut in the start menu, there is no error and the uninstaller runs correctly.

The error only appears when the installer calls the uninstaller.

I read the uninstaller for the last version from the registry:
ReadRegStr $R0 HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Application\
"UninstallString"
StrCmp $R0 "" done

Then I run it:
ExecWait '$R0 _?=${PreviousInstLocation}'

I took this from sample code found on the forums and the sourceforge site...

Has anyone seen something similar to this before? As I said, the uninstaller works without error when run from the start menu shortcut; it is only when the installer calls the uninstaller that the error appears.

Thanks for any help you can give me...
Irish2007 is offline   Reply With Quote
Old 20th May 2008, 18:33   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
I'd suggest copy/paste that part of code from the included example makensis.nsi

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 20th May 2008, 20:49   #3
Irish2007
Junior Member
 
Join Date: Nov 2007
Posts: 4
OK - my bad - I figured this out - between the time that I read from the registry into R0 and the time that I used the R0 registry value, I was calling another function that stomped on the value.

oops! thanks Red Wine for responding.
Irish2007 is offline   Reply With Quote
Old 1st June 2008, 04:00   #4
Sheik
Senior Member
 
Join Date: Feb 2007
Posts: 152
Which is another reason why having local variables would be REALLY handy. =)
Sheik is offline   Reply With Quote
Old 1st June 2008, 13:24   #5
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Functions should save all variables/registers they want to overwrite on the stack first. And then restore those variables/registers from the stack before returning...

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR 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