LaunchFile custom action doesn't accept path that include spaces - Advanced Installer Community
mathieu
Posts: 14
Joined: Thu Oct 23, 2014 9:06 am

LaunchFile custom action doesn't accept path that include spaces

Hello,

I'm trying to call a bat file from a Custom action right before the "Finish execution" step.
find attached the screenshot of this custom action config.

Here is what my dummy script looks like :

Code: Select all

echo %1
pause
if I pass [APPDIR] in the 'command line' field, it echoes "C:\Program" when installed in "C:\Program files(x86)\Your company\Your application\"
So it stops at the first space.

I tried double-quoting the command line parameter -> "[APPDIR]" but then my script fails without echoing anything and the installation rolls back.

Any idea what's happening and how I can pass a path containing spaces?

Thanks.

NB : I'm using AI v12.8
Attachments
Capture d’écran 2016-05-04 à 11.38.14.png
Capture d’écran 2016-05-04 à 11.38.14.png (51.68 KiB) Viewed 3795 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: LaunchFile custom action doesn't accept path that include spaces

Hello,

This is indeed caused by an Advanced Installer limitation of our "Launch file" custom action type. The issue is caused by the "Run as administrator" flag. To achieve what you want just uncheck the "Run as administrator" flag and enclose between quotes the [APPDIR] property reference from the "Command Line" field.

We'll try to improve our "Launch file" custom action functionality regarding this scenario in a future version of Advanced Installer. We'll update this thread when an improvement will be out.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mathieu
Posts: 14
Joined: Thu Oct 23, 2014 9:06 am

Re: LaunchFile custom action doesn't accept path that include spaces

Thanks for the tip. It worked just fine.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: LaunchFile custom action doesn't accept path that include spaces

You're always welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”