Section
ReadRegStr $W HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\test UninstallString
IfErrors 0 +2
ExecWait '$W /S'
SectionEnd
is there anything incorrect in this?
readRegSTr not working
10 posts
cannot compile it
Usage: ReadRegStr $(user_var: output) rootkey subkey entry
root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)
Error in script "C:\save\nsis-2.12\test.nsi" on line 41 -- aborting creation process
Usage: ReadRegStr $(user_var: output) rootkey subkey entry
root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)
Error in script "C:\save\nsis-2.12\test.nsi" on line 41 -- aborting creation process
Do you have
definition?
Var W
i dont have,,
do i need it?
do i need it?
yep, you do.
Var W
should be placed BEFORE you use $W the first time.
but you may also just use register variables, like $0.
they are already defined by nsis itself.
Var W
should be placed BEFORE you use $W the first time.
but you may also just use register variables, like $0.
they are already defined by nsis itself.
ReadRegStr $0 HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\test UninstallString
IfErrors 0 +2
ExecWait '$0 /S'
SetOutPath "$INSTDIR"
------------------------------------------------------------
is this ok?
but seems not working very well
IfErrors 0 +2
ExecWait '$0 /S'
SetOutPath "$INSTDIR"
------------------------------------------------------------
is this ok?
but seems not working very well
my installer does not ExecWait '$0 /S'
the reg entry is exist
the reg entry is exist
ExecWait '"$0" /S'
And your IfErrors logic is incorrect.
IfErrors [jump_if_errors] [jump_if_no_errors]
So, you are only executing the ExecWait instruction if ReadRegStr fails.
Another problem with your code (unless you have just missed it from your code snippet) is that you are not using ClearErrors before ReadRegStr. Therefore if ReadRegStr was successul and something else before caused an error then your ExecWait instruction will still not be executed.
-Stu
IfErrors [jump_if_errors] [jump_if_no_errors]
So, you are only executing the ExecWait instruction if ReadRegStr fails.
Another problem with your code (unless you have just missed it from your code snippet) is that you are not using ClearErrors before ReadRegStr. Therefore if ReadRegStr was successul and something else before caused an error then your ExecWait instruction will still not be executed.
[/code]
Section
ClearErrors
ReadRegStr $0 HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\test UninstallString
IfErrors +2
ExecWait '"$0" /S'
SectionEnd
-Stu
thanks for the help!