|
|
|
|
#1 |
|
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... |
|
|
|
|
|
#2 |
|
Forum King
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 |
|
|
|
|
|
#3 |
|
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. |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Feb 2007
Posts: 152
|
Which is another reason why having local variables would be REALLY handy. =)
|
|
|
|
|
|
#5 |
|
Major Dude
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 |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|