Custom command-line arguments? - Advanced Installer Community
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Custom command-line arguments?

Hello,

Can we have custom command-line arguments? Our own arguments. When passed it will do specific Custom Action?

:?:
K
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Custom command-line arguments?

Hello,

If you want to pass command line arguments to your custom action, you can use the predefined Launch attached file predefined custom action or Launch file predefined custom action.

The Launch attached file custom action you can execute an application (EXE) or run a script (VB or Java script) which is not among your project files. This usually happens when this functionality is only useful in the installation process, but not for the installed application itself.
The Launch fileallows the launching of a file into execution or opening of a folder (the same action that occurs when you double-click it in Explorer).

Also, can you please tell us what custom action are you using?(e.g. .bat file, .vbs, .dll, .exe)?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Custom command-line arguments?

Hello,

I am using a VBScript custom action and need to get the command-line argument to that. Can we pass custom command-line arguments like this, for example, installer.exe /mycustomargument

:?:
K
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Custom command-line arguments?

Hello,

For this you can set a property with the related value e.g. (MY_PROP = "mycustomargument" ).
In the Command Line field from the Launch attached file you can pass a reference to your property (e.g. [MY_PROP]).

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Custom command-line arguments?

Thanks

:D
K

Return to “Common Problems”