|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Oct 2006
Posts: 3
|
Uninstall cant write to Var(s) or Read from Registry???
I found somewhere in the docs or forum that you should use the registry if you are creating the Uninstall file in a different directory than the Install Directory.
But the code below still does not seem to work. Any ideas? Thx for you help! Greg Section "Uninstall" ReadRegStr $insDir HKLM "Software\Paxscan\Imaging Systems\Imagers\$serNum" "instdir" ; Install Directory ReadRegStr $uniFil HKLM "Software\Paxscan\Imaging Systems\Imagers\$serNum" "unifile" ; Uninstall File MessageBox MB_OK $insDir ; The message box shows nothing? RMDir /r $insDir DeleteRegKey HKLM "Software\Paxscan\Imaging Systems\Imagers\$serNum" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\$serNum" ; These seem to work fine ! Delete $uniFil ; Since $uniFil is "" this does not work SectionEnd |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jun 2005
Posts: 211
|
Are your variables declared first?
code: |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2006
Posts: 3
|
Yes, they are declared first up before any sections. Like so ...
;----------------------- ;Variables Var rcpExists Var snPath Var serNum Var uniDir Var uniFil Var insDir .... All the other stuff sections then Uninstall is the last section Greg |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Are you sure that registry key really contains what you're looking for? Did you write it in the installer? Is $serNum properly initialized? Where did you get $serNum from?
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Oct 2006
Posts: 3
|
I guess that they are not properly initialized in the Uninstaller section. They were earlier in the script. I think I just thought of a workaround as the serial number is also available in the registry. Thanks for your prompt help.
Greg |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|