|
|
|
|
#1 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
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. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You should add quotes in case the path contains spaces. ExecWait in the docs explains why.
Stu |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Apr 2008
Posts: 21
|
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 |
|
|
|
|
|
#4 | |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
Quote:
But did you test on Win95 and NT4? I'm sure it tells you to use quotes for a reason. IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
|
#5 | ||
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
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:
|
||
|
|
|
|
|
#6 | |
|
Junior Member
Join Date: Apr 2008
Posts: 21
|
Quote:
|
|
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
|
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
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.
|
|
|
|
|
|
#9 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
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
IntOp $PostCount $PostCount + 1 |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|