Old 25th October 2006, 17:31   #1
vmsgman
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
vmsgman is offline   Reply With Quote
Old 25th October 2006, 18:46   #2
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
Are your variables declared first?
code:

Var insDir
Var uniFil

Section "Uninstall"
...
SEctionEnd

goldy1064 is offline   Reply With Quote
Old 25th October 2006, 18:58   #3
vmsgman
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
vmsgman is offline   Reply With Quote
Old 25th October 2006, 21:31   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
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
kichik is offline   Reply With Quote
Old 25th October 2006, 21:58   #5
vmsgman
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
vmsgman 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