09.12.2012 Views

InstallShield 2012 Express Edition User Guide - Knowledge Base ...

InstallShield 2012 Express Edition User Guide - Knowledge Base ...

InstallShield 2012 Express Edition User Guide - Knowledge Base ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Changing the Product Version During a Build<br />

Chapter 16: Building, Testing, and Distributing Installations<br />

Configuring and Building Releases<br />

Although the product version number in an <strong>InstallShield</strong> project (.ise) file or a built .msi file cannot be<br />

changed through the command line, it can be done using VBScript. The code sample below changes the<br />

version number in either a built .msi file, or an .ise project file. Changing the .ise file causes all .msi files<br />

built from that .ise file to have that build number in them.<br />

You need to change the C:\Test.msi and 3.54.0154 parts so that they reflect the .msi file (or the .ise file)<br />

and the product version that you want to use. You could update the script so that the VBScript accepts<br />

these parameters as command-line arguments or registry entry values.<br />

Dim pInstaller<br />

Set pInstaller = CreateObject("WindowsInstaller.Installer")<br />

Dim pDatabase<br />

Set pDatabase = pInstaller.OpenDatabase("C:\Test.msi", 2)<br />

pSQL1 = "SELECT `Value` FROM `Property` WHERE `Property` = 'ProductVersion'"<br />

Dim pView1<br />

Set pView1 = pDatabase.OpenView(pSQL1)<br />

pView1.Execute<br />

Dim pRecord1<br />

Set pRecord1 = pView1.Fetch<br />

If (Not pRecord1 Is Nothing) Then<br />

pRecord1.StringData(1) = "3.54.0154"<br />

Else<br />

MsgBox "error"<br />

End If<br />

pView1.Modify 4, pRecord1<br />

pView1.Close<br />

pDatabase.Commit<br />

MsgBox "Done!"<br />

Build Release Location<br />

The disk image folders for your installation are built in the release location. All additional files and<br />

folders necessary for storing uncompressed application files are placed in subfolders of the disk image<br />

folders. The release location is a subfolder of your project’s location.<br />

The release is built in the following folder:<br />

\\<strong>Express</strong>\\DiskImages\Disk1<br />

The default project location is:<br />

C:\<strong>InstallShield</strong> <strong>2012</strong> Projects<br />

For example, if the current project name is CoolProject, and the media type for the release is a CD-ROM,<br />

you can find the Disk1 folder under the following location:<br />

C:\<strong>InstallShield</strong> <strong>2012</strong> Projects\CoolProject\<strong>Express</strong>\Cd_rom\DiskImages<br />

<strong>InstallShield</strong> <strong>2012</strong> <strong>Express</strong> <strong>Edition</strong> <strong>User</strong> <strong>Guide</strong> ISE-1800-UG01 295

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!