|
|
|
|
#1 |
|
Member
|
DeleteKey Not Working
Hey everyone, I just have a real simple bit of code listed below, but for some reason the DeleteKey function that is part of the registry plugin is not workin... I am not sure what is causing it...
I could use the DeleteRegKey, but just getting a handle on the output that is why I am using the deletekey... If someone else can try this and let me know if I am crazy or what... Thanks, Squirre1 PHP Code:
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Aug 2007
Location: Paris, France
Posts: 304
|
what about using DeleteRegKey from NSIS, instead of the Registry plug-in ?
My NSIS plug-ins: http://wiz0u.free.fr/prog/nsis.php |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2007
Location: Paris, France
Posts: 304
|
additionnally, if you plan to backup .pdf extension association.. instead of creating a .pdfbkup extension entry (WTF?!), it would be better to backup the value in a sub-key of .pdf
like .pdf\MyApp-Backup or maybe even just save only the (default) value to another name and then change it, instead of replacing the whole .pdf key My NSIS plug-ins: http://wiz0u.free.fr/prog/nsis.php |
|
|
|
|
|
#4 |
|
Member
|
I want to make sure the entire contents of the .pdf class are maintained, not just one value, so the easiest thing to do is just copy the key...
Additionally, I can do the DeleteRegKey, BUT my installer is just a wrapper for another msi installation so I am trying to avoid it altering the ErrorLevel which is returned to our management system for successfail validation... I mean I guess I could do something along the following GetErrorlevel $2 DeleteRegKey "Path to key" GetErrorlevel $1 <Handle $1 error result> SetErrorlevel $2 and go on my marry way... As long as DeleteRegKey will return a valid error result on failure... But that does not answer why registry::deletekey is not working, even though I can do a DeleteRegKey and it DOES work... Thanks.... |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: Aug 2007
Location: Paris, France
Posts: 304
|
Quote:
Unless specified in the documentation, most NSIS instructions don't alter the ErrorLevel, just the error flag. See also NSIS documentation D.1 My NSIS plug-ins: http://wiz0u.free.fr/prog/nsis.php |
|
|
|
|
|
|
#6 |
|
Member
|
@gringoloco023 - Blah, I thought about that, just never tried it. Kept diggin on why it just didnt work in HKCR... HKCR is basically a shortcut to the actual location of HKLM\Software\Classes...
@Wizou - Thanks for that piece... So if an function in NSIS sets the errorflag, it does not actually modify the ErrorLevel, for ex. SetErrorLevel and GetErrorLevel... That was one of my concerns... I have not had a LOT of time to dig on this because I have been working on other things as well, but you guys helped save me some time.. Thanks, Squirre1 |
|
|
|
|
|
#7 |
|
Member
Join Date: Nov 2009
Posts: 52
|
Some how ${registry:
eleteKey} can not deal with HKCR,if you use HKLM\SOFTWARE\Classes instead and it works as expected |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Aug 2007
Location: Paris, France
Posts: 304
|
Only SetErrorLevel, Abort, and a the user clicking Cancel can modify the installer exit code (error level). The errorflag set by NSIS has no effect on the error level.
My NSIS plug-ins: http://wiz0u.free.fr/prog/nsis.php |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|