Setting value in the installer file (after it is built) - 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!

yishai
Posts: 54
Joined: Wed Nov 23, 2005 11:54 pm

Setting value in the installer file (after it is built)

I want to be able to tag specific installers (i.e. an exe installer of my application) with a tag for a specific user. The idea goes something like this.

When I have the package ready, I tag it by calling the installer package with a command line:

msiexec.exe /i "C:\Example.msi" MY_PROP="myValue"

Q1: Can I do this on on an exe installer?
Q2: If not, is there a way from the command line to unpack an exe to an msi, run this command, and run a command to pack it back to an exe again?

After I set My_PROP, I would like to have this version somewhere so I can get to it from the application. How can I add it to the ini file, to my own xml file, to the registry, whatever. Anywhere I can at run time query this value and find out what it is.


Is that possible? Is there a better way to do that?

Thanks

-Yishai
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Re: Setting value in the installer file (after it is built)

Hi,
msiexec.exe /i "C:\Example.msi" MY_PROP="myValue"
You can use a command line for the built EXE file like this: package.exe MY_PROP="myValue". This command line will be past to the MSI also.
After I set My_PROP, I would like to have this version somewhere so I can get to it from the application. How can I add it to the ini file, to my own xml file, to the registry, whatever. Anywhere I can at run time query this value and find out what it is.
You can store the property value in a INI file like this: In "Files and Folders" page create a INI file and add a new INI entry with "Value" field set to: [MY_PROP]. This can be stored similarly in a XML file or registry.

Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”