Wrap arguments with quotes - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

stevo.zilik
Posts: 42
Joined: Thu Jul 19, 2007 1:39 pm

Wrap arguments with quotes

Hi,

I have a custom action - executable that is run with 2 arguments. Both of the arguments are paths to some directories. Arguments are parsed by space character, so problem occurs when path contains space characters. To make sure that path is not parsed when containing spaces, Quotes(") can be added :

run.exe "C:\Program Files\My Application" "D:\Installation Dir"

this way, run will correctly recognize two parameters. This looks in custom action arguments like this:

"[SourceDir]" "[DESTINATION_DIRECTORY]" . But for some reason, advanced installer messes up the Quotes and sends following arguments:

C:\Program Files\My Application" ; D:\Installation Dir"

if there is only one expression with quotes, everything runs good.

Is this a bug?
Is there a workaround?

thanx
jefftullin
Posts: 5
Joined: Mon Nov 26, 2007 10:45 am

One quick and dirty workaround:
Supply the short filename versions of the paths (assuming you know these)
eg C:\progra~1\myfold~1\stuff C:\progra~1\myfold~1\others
stevo.zilik
Posts: 42
Joined: Thu Jul 19, 2007 1:39 pm

thanx for answer, I've solved it. My complete arguments looked like:

"[SourceDir]"Files "[DESTINATION_DIR]"

the problem was that when the second quote was before 'Files' , it was messed up. But a soon as I put the second quote behind 'Files' :

"[SourceDir]Files" "[DESTINATION_DIR]"

it works correctly

Return to “Common Problems”