![]() |
ARP registry - quotes or no quotes
This has bothered me for some time now. In the wiki: http://nsis.sourceforge.net/Add_unin...emove_Programs
Some guy says that "you should always quote the path to make sure spaces in the path will not disrupt Windows to find the uninstaller." So the wiki example ends up with this: WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ImageMaker" "UninstallString" "$\"$INSTDIR\uninstall.exe$\"" As far as I can judge this is just plain wrong. I never quote the path, and it works just fine. Is there some legacy reason why one would add quotes to the regstring? Because if not, I'm going to delete this erroneous info from the wiki. |
You should add quotes in case the path contains spaces. ExecWait in the docs explains why.
Stu |
Windows itself does not need any "" on path or any value in the registry, as far as i know.
I have tested an installation without "" after the "InstallPath" and used ()+´á# and space in the install path. It deinstalled without error. Maybe it depends on the app itself if "" is needed or not. e.g. for switches or functions of the .exe!? ExecWait starts an application outside the installer. This have nothing to do with the Registry entry. I guess it need quotesin this case, because it calls the .exe similar as cmd.exe does... bye |
Quote:
Quote:
|
Add/remove programs handles the path fine on newer OSs with or without quotes probably because it has to deal with the people who have not used them. But one issue goes to your own installer which may want to read the registry value to uninstall a previously installed version. If you've missed quotes from the path and then add /S, it could fail.
Quote:
Quote:
|
Quote:
|
Quote:
Stu |
Stu, thanks for clearing that up, I had not thought of the parameter ambiguity problem. And even without params, if it's officially required by MS then the wiki info is technically correct.
|
I could not actually find MS docs that state that the path should be quoted but MSDN is 2000+ these days, and the uninstall info is MSI specific :(
|
| All times are GMT. The time now is 17:40. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.