Reputation: 1044
Is there any way in which data can be added in already built setup made by Installshield?
What I need is to add different product keys for a same setup executable without the need to build a separate copy for each product key.
Is there any way in which this could be achieved using Installshield?
Upvotes: 0
Views: 3610
Reputation: 15905
Since you are using an InstallShield setup.exe, the simplest approach is probably to also use the tool setupini.exe (in some earlier versions of InstallShield this was a separate "unsupported" tool, and you can find downloads in our KB system). You could use this in a manner similar to that shown in the article, to modify the command line passed to the MSI package to include a property that contains the key. Using a property called PRODUCTKEY
it would look like this:
SetupIni.exe "<path to>\MySetup.exe" Startup CmdLine PRODUCTKEY="12-34-56"
For this to be meaningful, you would have to include something in the installer that uses this property. The simplest may be a registry key whose value (or value data) includes a reference to the PRODUCTKEY
property. Represented as a .reg file, that might look like this:
[HKEY_LOCAL_MACHINE\Software\My Company Name\My Product Name\Version]
"ProductKey"="[PRODUCTKEY]"
Note that PRODUCTKEY
should be a public property (its name includes no lower case characters), and listed in the SecureCustomProperties
property. Note as well that this should be considered advisory rather than secure: if, for example, you are looking to license your product by requiring the customer to enter a matching code, don't. This approach makes the key available to customers with the know-how to log the installation, or even to find command-lines with task manager.
If setting a property is insufficient for your needs, you could also consider creating a transform, and configuring it to apply automatically through the use of setupini.exe, but then you will also have the problem of getting the transform to the customer since he probably downloads only a single file today, and this would require two files.
Upvotes: 1