|
|
#1 |
|
Junior Member
Join Date: Nov 2005
Posts: 5
|
uninstconfirm/uninstfiles shows wrong folder
Happy rest of the year, nsis folks!
I have a pretty straightforward install script that tries automatically remove existing installation. I check in .onInit if an uninstaller.exe exists in the registry. When I use the uninstconfirm page, it shows the InstallDir value (I set it in the installer to default value) instead of the real $INSTDIR path (changed with Page directory). .onInit looks like: ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Product" "UninstallString" ... ExecWait '$R0 _?=$INSTDIR' If I try to set INSTDIR to correct value from registry (got a key containing the true install path) I get a installer error. |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
What about 4.8.1.22 InstallDirRegKey ?
![]() code: And simply code: when calling uninstaller |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Nov 2005
Posts: 5
|
Thanks Takhir,
Your answer led me to solution. The error was generated because I accidentally wrote the registry value with surrounding "'s -> ExecWait got gibberish.. BTW. Using only ExecWait '$R0' caused the install window to appear underneath the uninstallconfirm page. Thanks, Martti |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
But you may need to hide uninstaller window even if it not comes foreground.
|
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
And you are right, '$R0 _?=$INSTDIR' starts uninstaller directly (not it's copy in tmp folder), so ExecWait waits for uninstaller exit.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|