|
|
#1 |
|
Junior Member
Join Date: Jan 2006
Posts: 12
|
readRegSTr not working
Section
ReadRegStr $W HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\test UninstallString IfErrors 0 +2 ExecWait '$W /S' SectionEnd is there anything incorrect in this? |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Jan 2006
Posts: 12
|
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 |
|
|
|
|
|
#3 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Do you have
code: definition? |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jan 2006
Posts: 12
|
i dont have,,
do i need it? |
|
|
|
|
|
#5 |
|
Major Dude
|
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. hand by comm@nder21 ---------- WiKi pages:CreateInternetShortcut|Enhanced FindWindow|Parse CSV-Data|Open/Close CD-Drive|Installer without Icon|Vista application compatibility |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Jan 2006
Posts: 12
|
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 |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jan 2006
Posts: 12
|
my installer does not ExecWait '$0 /S'
the reg entry is exist |
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Jul 2004
Posts: 671
|
code: |
|
|
|
|
|
#9 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
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. code: [/code] -Stu |
|
|
|
|
|
#10 |
|
Junior Member
Join Date: Jan 2006
Posts: 12
|
thanks for the help!
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|