PeterM
Posts: 19
Joined: Fri Mar 29, 2013 9:28 pm

10.1 breaking change - can no longer " " custom actions

I had a number of custom actions in an installer that I upgraded to 10.1.

These custom actions often are the "viewer.exe" style ones where I use cmd.exe or appcmd or something similar.

So I'd have to quote parameters that I'd insert for something like cmd "[PARAMETER1]" to handle spaces in the paramater.

For example, I might have something that uses cmd.exe to move files around: /q /c rmdir /s /q "[Staging_Dir]"

If I look at that custom action in 10.1, it strips off the quotes from the parameter as soon as I look at another custom action.

The only way I can keep the quotes on there is add a space, so "[Staging_Dir] ".

This works OK for some commands, but some commands require the exact string, without padding it with a space.

Any ideas? The new look for custom actions editing is nice, but this a major issue for me to have to suddenly workaround in 10.1.
PeterM
Posts: 19
Joined: Fri Mar 29, 2013 9:28 pm

Re: 10.1 breaking change - can no longer " " custom actions

I found a workaround for now after a bit of experimentation.

I can define an Install Parameter QT that is just a single "

Then in my Custom Action Command Line I can do something like: delete vdir [QT][VDIR][QT]

If [VDIR] is Default Web Site/Dir1/, this command line becomes: delete vdir "Default Web Site/Dir1/"

Exactly what I want.

Still, a bit disconcerting that I'll have to go back and test all of my many custom actions again now
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: 10.1 breaking change - can no longer " " custom actions

Hi,

The quotes are stripped automatically because we add them in the background for you. Can you please try to remove the workaround and see if the custom actions work as expected?

We did this because a lot of users forgot or did not knew to add the quotes.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PeterM
Posts: 19
Joined: Fri Mar 29, 2013 9:28 pm

Re: 10.1 breaking change - can no longer " " custom actions

I tried without quotes for a number of different custom actions and they are not added in for me in the right place.

It seems like the whole custom action, command line plus arguments is put in quotes which is fine, but if an individual argument needs to be in quotes it doesn't work.

Even just trying a custom action that did a cmd.exe del [DIRECTORY] and the directory has a space in it, that failed.
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: 10.1 breaking change - can no longer " " custom actions

Hi Peter,

Indeed, I investigated this a little more and found some problems with out solution.

We'll work on some improvements and will include them in 10.2 very soon. Thank you for bringing this to our attention.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PeterM
Posts: 19
Joined: Fri Mar 29, 2013 9:28 pm

Re: 10.1 breaking change - can no longer " " custom actions

Thanks for letting me know.

I'll look forward to 10.2.

Do you guys have a roadmap for future releases?
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: 10.1 breaking change - can no longer " " custom actions

We try to release a new version each month. So 10.2. should be around the end of May or beginning of June.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vbjeff
Posts: 23
Joined: Tue May 14, 2013 3:08 pm

Re: 10.1 breaking change - can no longer " " custom actions

The same problem also happens for the "Working Directory" field of the "Launch file" custom action. If I use a property that contains a directory without quotes and add the quotes around the property (i.e. "[FOLDER_PROP]" ) the quotes get removed the next time I look at the custom action. They do not get added back and cause an error when the action is executed if the directory contains a space.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: 10.1 breaking change - can no longer " " custom actions

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I've tested the scenario and indeed this is an Advanced Installer issue. A fix for this issue will be available in next version of Advanced Installer, thank you for bringing it to our attention. Until then, as a workaround, you can try to use the approach suggested by PeterM:
- Go to "Install Parameters" page and add a proeprty like this:
  • Name: QUOTE
    Value: "
- Go to "Custom Actions" page and add a "Launch file" custom action like this:
  • File To Launch: <target file>
    Working Directory: [QUOTE][Directory_Prop][QUOTE]
- Build and run your project.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vbjeff
Posts: 23
Joined: Tue May 14, 2013 3:08 pm

Re: 10.1 breaking change - can no longer " " custom actions

Thanks Daniel and Peter. It's good to have a workaround and to know it will be fixed in the next release.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: 10.1 breaking change - can no longer " " custom actions

Hello,

This was fixed in version 10.2 of Advanced Installer released on May 27, 2013.

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

Return to “Common Problems”