alexk
Posts: 13
Joined: Sat Jan 07, 2012 4:39 pm

Property resolving in custom action command line

i have a custom action called with some command line arguments:

"[APPDIR]MyCustomAction.exe" /action=commit "/appdir=[APPDIR]"

the problem is, that the /appdir="[APPDIR]" is handed over to the custom action
with an ending string quote (as in my example is /appdir=c:\Program Files\MyApp").

when i replace the [APPDIR] property with the constant value:

"[APPDIR]MyCustomAction.exe" /action=commit "/appdir=c:\Program Files\MyApp"

ist works and is correctly handed over without the ending quote.

I have a workaround here in my custom action, that manually removes the ending quote, but
this is a hacky solution.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Property resolving in custom action command line

Hello and welcome to Advanced Installer forums,

Can you please try the following command line string and see the result:

Code: Select all

"[APPDIR]MyCustomAction.exe" /action=commit /appdir="[APPDIR]"
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
alexk
Posts: 13
Joined: Sat Jan 07, 2012 4:39 pm

Re: Property resolving in custom action command line

hello mihai

thank you for responding.

yes, i tried this version too with the same result. i expected, that the parameters are splitted
at the whitespaces like in windows console mode, thats why i posted the more related
version "/appdir=[APPDIR]" but /appdir="[APPDIR]" yields to the same result/problem (ending quote).
The quotes are nessesary because of whitespaces in [APPDIR], where arguments are else cutted the wrong way.

all the best,
alex
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Property resolving in custom action command line

Hi Alex,

We have tested this and unfortunately cannot replicate the issue. Please make sure your custom action doesn't somehow append the extra quote to the passed string argument.
If after debugging the issue persists, can you please send us a sample .AIP and .EXE that evidentiate this behavior?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”