This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Output Productcode to a file on install?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 24, 2015
11:26 AM
Output Productcode to a file on install?
Hi folks - I'm new to Installshield (well, back after about 15 years) and of course have a hot issue:
I need to be able to output ProductCode to a text file along with my setup.exe. The current project I'm working on uses a Basic MSI Project. Is there some setting I can use, or could someone provide an example script to generate this file?
I would be most grateful. Thanks
BLink
I need to be able to output ProductCode to a text file along with my setup.exe. The current project I'm working on uses a Basic MSI Project. Is there some setting I can use, or could someone provide an example script to generate this file?
I would be most grateful. Thanks
BLink
- Tags:
- productcode
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 25, 2015
12:55 AM
Brian Link wrote:
Hi folks - I'm new to Installshield (well, back after about 15 years) and of course have a hot issue:
I need to be able to output ProductCode to a text file along with my setup.exe. The current project I'm working on uses a Basic MSI Project. Is there some setting I can use, or could someone provide an example script to generate this file?
I would be most grateful. Thanks
BLink
You can easily accomplish this by using the Text File Changes view in the Installation Designer tab.
The steps are:
1. Add a dummy copy of your text file with text that you will replace using InstallShield's Text File Changes view.
In my example, I placed my text file in my app's main folder, [INSTALLDIR], and named it ProductCode.txt. The text file contains dummy text that the Text File Changes view will search for and replace:
2. Go to the Text File Changes view and add a new Change Set which tells InstallShield which file(s) to update.
In my example I pointed it to [INSTALLDIR] and specified my file name, ProductCode.txt (you can also use wildcards)
3. On the Text File Changes view, add a new Change which tells InstallShield about your new text.
In my example I told it to replace the text "ProductCode={00000000-0000-0000-0000-000000000000}" with "ProductCode=[ProductCode]"
That's it. After you run the install, go to [INSTALLDIR] and open ProductCode.txt and you'll see that it worked:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 27, 2015
09:10 AM
Evan Border wrote:
You can easily accomplish this by using the Text File Changes view in the Installation Designer tab.
Thank you very much!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 27, 2015
10:07 AM
Evan Border wrote:
You can easily accomplish this by using the Text File Changes view in the Installation Designer tab.
One question: I need to output this file to the Release path, ie: "SINGLE_EXE_IMAGE\DiskImage(s)\DISK1". I can't see a path variable for that - is there a way to build that into the release?
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 27, 2015
09:25 PM
Brian Link wrote:
One question: I need to output this file to the Release path, ie: "SINGLE_EXE_IMAGE\DiskImage(s)\DISK1". I can't see a path variable for that - is there a way to build that into the release?
Thanks
The Text File Changes view works its magic at install time, not build time. If you want to copy something into your build folder as part of your build process, use the Releases view's Events tab. There you will see Postbuild Event, a feature of InstallShield Premiere Edition which allows you to call commands that run at the end of the build. It allows you to use InstallShield Path Variables, as well as Windows Environment Variables.
See the following help topic for more information:
h t t p : / / helpnet.flexerasoftware.com/installshield21helplib/helplibrary/SpecifyingBuildEvents.htm
http://helpnet.flexerasoftware.com/installshield21helplib/helplibrary/SpecifyingBuildEvents.htm
As for your question about the Release Path folder not having a Path Variable, it actually does and the above help topic talks about it. The name of the Path Variable is