- Revenera Community
- InstallShield Forum
- Re: Impossible to escape blank space ?
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Printer Friendly Page
Impossible to escape blank space ?
I am trying to run a command to execute an .exe while specifying a path in which there are several spaces.
Based on this example (https://community.flexera.com/t5/InstallShield-Forum/Space-characters-in-Setup-exe-command-line/td-p/131031), I tried to do something like this (in an installshield script)
MySetup.exe " /v" + "\"INSTALLDIR=c:\\PROGRA~1\\Install\\My Setup\"";
(I use notations with "\" to escape the sequences as explained here: https://docs.revenera.com/installshield22helplib/Subsystems/installshield22langref/helplibrary/LangrefEscape_sequences.htm )
Unfortunately it doesn't work. At execution, I get this message:
For program files, I know I can use the notation "c:\PROGRA~1" I tried and it works. But I still have the space problem with the final folder.
Can't escape the spaces in my case? 😞
Try below installscript code
szProgram = szSupportDir ^ "Setup.exe";
szInstallPath = "\\"+"\""+szInstallPath+"\\"+"\"";
szCommandLine = "/s /v"+"\""+"INSTALLDIR="+szInstallPath+" PROPERTY="+szprop+" /qn" +"\"" ;