Custom Action Attached exe Property Command Line Param - 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!

bhodso
Posts: 19
Joined: Sun Apr 20, 2008 1:11 am

Custom Action Attached exe Property Command Line Param

I set up a property that is generated when the install first runs before any dialogs are shown that creates a unique install ID for the instance running. I use this parameter as part of my method to send Post Data to my server for user sign-up information and it works great. I can reference the property, etc. no problem.

Here is the vbscript that runs at the very first and generates the GUID and property which I call "iid" for installer id:

Code: Select all

Function GenerateGuid()
	Set TypeLib = CreateObject("Scriptlet.TypeLib")
	Dim sGuid
	sGuid = TypeLib.Guid
	sGuid = Replace(sGuid, "{", " ")
	sGuid = Replace(sGuid, "}", " ")
	sGuid = Trim(sGuid)
	Session.Property("iid") = sGuid
End Function
But at the end of my install, I run an exe to start up my newly installed application. When I run this app, I need to pass this GUID as a command line parameter to my app. I have my exe set up as an attached custom action and in the command line parameters, I have:

installid [iid]

Where "installid" is the command line parameter for my exe and "[iid]" is the property I generated earlier in the install.

What's strange is that referencing [iid] and passing it as a post parameter works great. But on the last part of the install, when I pass it to my exe, I get an empty string for the value. So for some reason, it looks like either I am referencing it wrong in the command line parameters for the custom action or am I uncovering a bug?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Custom Action Attached exe Property Command Line Param

Hi,

Please note that private properties (their name contains lowercase letters) cannot pass their value from the UI sequence (the installation dialogs) to the execute sequence (when custom actions run). Therefore, you can try using a public property (for example, "IID" instead of "iid").

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bhodso
Posts: 19
Joined: Sun Apr 20, 2008 1:11 am

Re: Custom Action Attached exe Property Command Line Param

Yes, that worked great. I had no idea I need to use CAPITALIZATION in my custom properties. Great!

Return to “Common Problems”