cai_sebas
9th October 2005 13:44 UTC
Search, Verify and Destroy
Hi im looking for a code for my installer section. Search, Verify and Destroy.
; Searches the location
ReadRegStr $0 HKLM "Software\Sebas\Sebas5" "Home"
[Here must be an code which aborts this process (beneath) if an specific Registry code is found.]
; Deletes some stuff
Delete "$0\*.*"
Can someone help me out?
kichik
9th October 2005 13:59 UTC
To abort the installation, simply use the Abort instruction.
cai_sebas
9th October 2005 16:38 UTC
Thanks for your reply kichik, but i do not want to abort my installation! I only want to not execute the command:
; Deletes some stuff
Delete "$0\*.*"
So what to do?
(One little side-kick question where in my script with which code can i activate the following code?
http://nsis.sourceforge.net/wiki/Clo..._User_Approval)
deguix
9th October 2005 16:47 UTC
Just to remove the line containing the "Delete" instruction...
cai_sebas
9th October 2005 16:51 UTC
Please read the whole topic, its about this
; Searches the location
ReadRegStr $0 HKLM "Software\Sebas\Sebas5" "Home"
[Here must be an code which aborts the process beneath (only) IF ReadRegStr $1 HKLM "Software\Sebas\Sebas5\Nrm" "Del" is found.]
; Deletes some stuff
Delete "$0\*.*"
See?
(One little side-kick question where in my script with which code can i activate the following code? http://nsis.sourceforge.net/wiki/Cl...h_User_Approval)
deguix
9th October 2005 16:55 UTC
1. Oh, use "StrCmp":
StrCmp $1 "" +2
2. (for the "side-kick" question)
Call CloseDelphiWithUserApproval
cai_sebas
9th October 2005 17:22 UTC
I now have this script:
; Search for Sebas 5 and destroy
ReadRegStr $0 HKLM "Software\Sebas\Sebas5" "Home"
StrCmp $1 "" +2
ReadRegStr $1 HKLM "Software\Sebas\Sebas5" "Sebaslight"
Delete "$0\Sebas.exe"
But it does not seem to work... has any one an idea whats wrong. To make it all clear:
When reg "HKLM "Software\Sebas\Sebas5" "Sebaslight"" is found "Delete "$0\Sebas.exe" must niet be executed
Afrow UK
9th October 2005 17:47 UTC
ReadRegStr $0 HKLM "Software\Sebas\Sebas5" "Home"
StrCmp $0 "" +4
ReadRegStr $1 HKLM "Software\Sebas\Sebas5" "Sebaslight"
StrCmp $1 "" 0 +2
Delete "$0\Sebas.exe"
You should read up on StrCmp in the documentation.
-Stu