InstallShield Tips and Techniques

October 26, 2015

How to make shortcuts RunAsAdministrator and run in Compatibility Mode

Filed under: Reference Materials — shieldmaster @ 11:36 pm

 

I had a client request that their application shortcuts to be enabled to have the checkbox “Run this program as an Administrator” and also to have the checkbox for “Run this program in Compatibility mode for WinXP” – as shown here:

I started doing research and found out that all roads were pointing towards having a Manifest XML document created for each application executable. Well, that seemed like it was going to be too much work… So I setup a test VM machine, and altered the shortcut properties. I exported the HKCU and HKLM registry hives before and after the change, and found out that an entry in the HKCU registry hive was made when I altered the shortcut. My example shows the WinXP SP3 compatability setting – but if you modify a shortcut for Windows 7 – you can observe another registry change. The value “WINXPSP3” changes to “WIN7RTM”.

Note: For WinXP Operating Systems (yes Virginia, they are still out there…), the compatibility setting is “WIN2000“.

 

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]

“c:\Program Files (x86)\SQLFinancials\SQLAP\SQLAP.exe”=”WINXPSP3 RUNADMIN”

Since it elevate the actual application executable, the elevation works for both desktop shortcuts as well as Program shortcuts. Obviously this will work for just the user that installed the software, but it solves the problem for 99% of my client’s needs.

ShieldMaster

InstallShield Issue when importing Dialog into Basic MSI Projects

Filed under: Reference Materials — shieldmaster @ 7:05 pm

 

I was working on a project recently that required me to replicate one of the dialogs from one project to another – in this case a dialog with a radio selection – to let the client indicate if a Server or Workstation installation was desired. Instead of recreating the dialog, I chose the option to “Export” the dialog from one project to the target project. After the export and cleanup – my installation encountered a strange abort, which occurred after the dialogs were displayed when I selected INSTALL on the “Ready To Install” dialog – the installation activity disappeared!!! No dialogs appeared, just the dead Setup/MsiExec processes running.

 

It took a week of sleuthing to uncover the problem. A WEEK of 3-4 hours each night trying to determine the problem! Finally I realized that the String table contained incorrect checksums! I had modified the string table entry while the project was not open in InstallShield but kept the checksum value the same. Apparently InstallShield does not check the String Table integrity when you open/close the project. Consequently during execution, the incorrect String Table values caused the install to abort.

 

To clarify, I am going to step thru the correct process to Export/Import a dialog – and show you what I did wrong!

 

 

Exporting the Dialog

Here is the dialog I wanted to export/import – notice the icons representing the Server/Client workstation:

 

To start the process – I right-clicked the dialog and chose “Export to Project File…” – as shown here:

 


 

Now, navigate to the InstallShield project you want to import the dialog – (Hint: it must not be open in InstallShield – if so it will be locked and you can’t import the dialog)..

 


 

Immediately you will see String Tables being shown as conflicting values – in this case I can’t correct them since they are not “Key” values – so I must Overwrite and resolve them later. Here are a couple of conflicts:

 


 


 

Resolving Icon Issues

 

The first thing you will notice will be some new files (NewBinary1,etc) in the ISM directory – they are misplaced Icons that are imported from the orginal dialog – in this case the Dialog Banner, and Client/Server icons.

 


 

To demonstrate – rename the files with BMP extension and view them as Icons:


 

Now open the SQLFinancials project that you exported the dialog into – and display the new dialog “ISI_SetupType”

 


 

 

Highlight the Server icon – and you will see it pointing to that NewBinary file. Now correctly point it to the existing icon in your directory, as shown here:

 

 


 

Now correctly point the other two icons to their icon in your directory to resolve this issue, now you can delete the NewBinary files.

 

Resolving String Table Issues

 

The string table now has entries that overwrote existing table entries, as pointed out during the conflict dialogs during exporting – I can see this by using a tool like “BeyondCompare” to view the Before/After images of the SQLFinancials.ISM project (both projects must be saved in XML format).

 

As you can see, I have the before image (“Copy of SQLFinancials_B4NewDialog.ISM” on the top panel and the modified “SQLFinancials.ISM” on the bottom panel. Notice that “NewString1” has been overlayed with different sting values – and the checksum is different to match the new values. The same situation exists for entries “ID_STRING71” thru “ID_STRING75”.

 


 

The proper method to resolve this issue is to open the SQLFinancials project within InstallShield and follow these steps for each String table entry:

  1. Go to the new Dialog – and select the string entry “Client Workstation” and select the three dots […] to the right side of the Text entry. This opens the String Table to “NEW_STRING1”

 


 

 

  1. Copy the entry found there “{&MSSansBold8}Client Workstation”
  2. Press the + button to create a new String table – and paste that value in the field – as shown here:
  3. Repeat for each of the string table entries that were overwritten during the import of the dialog.

     


 

  1. Now Save the project in InstallShield. To put the NewSTRING1 back to the original value – you can navigate to the String Table within InstallShield and copy the values from the original project. I do it quicker by closing the InstallShield project and using BeyondCompare – as noted here:
    1. Open the before/after projects in BeyondCompare – and COPY each string table that was modified from the Before image to the After image. You want to ensure the entry for NEW_STRING1 in the before image is exactly like the entry in the String Table of the After project. Copy the entire line – which includes the checksum value.

 


 

Don’t manipulate the String Table outside of InstallShield

 

Now you have correctly put the String table back in sync, please don’t do what I did which caused the abort during execution. What I did was to use the BeyondCompare tool – and I copied the string value “{TahomaBold8}[ISI+PreReq2_Selection1_Title]” from the Before ISM to the After ISM for entry “NEW_STRING1”. I did not copy the corresponding checksum – this was my mistake. BAD BAD BAD L

 

Hopefully this helps you in your project development!

 

ShieldMaster

InstallShield Issue when importing Dialog into Basic MSI Projects

Filed under: Reference Materials — shieldmaster @ 6:57 pm

 

I was working on a project recently that required me to replicate one of the dialogs from one project to another – in this case a dialog with a radio selection – to let the client indicate if a Server or Workstation installation was desired. Instead of recreating the dialog, I chose the option to “Export” the dialog from one project to the target project. After the export and cleanup – my installation encountered a strange abort, after the dialogs were displayed and I selected INSTALL on the “Ready To Install” dialog the installation activity disappeared!!! No dialogs appeared, just the dead Setup/MsiExec processes running.

 

It took a week of sleuthing to uncover the problem. A WEEK of 3-4 hours each night trying to determine the problem! Finally I realized that the String table contained incorrect checksums! I had modified the string table entry while the project was not open in InstallShield but kept the checksum value the same. Apparently InstallShield does not check the String Table integrity when you open/close the project. Consequently during execution, the incorrect String Table values caused the install to abort.

 

To clarify, I am going to step thru the correct process to Export/Import a dialog – and show you what I did wrong!

 

 

Exporting the Dialog

Here is the dialog I wanted to export/import – notice the icons representing the Server/Client workstation:

 

To start the process – I right-clicked the dialog and chose “Export to Project File…” – as shown here:

 


 

Now, navigate to the InstallShield project you want to import the dialog – (Hint: it must not be open in InstallShield – if so it will be locked and you can’t import the dialog)..

 


 

Immediately you will see String Tables being shown as conflicting values – in this case I can’t correct them since they are not “Key” values – so I must Overwrite and resolve them later. Here are a couple of conflicts:

 


 


 

Resolving Icon Issues

 

The first thing you will notice will be some new files (NewBinary1,etc) in the ISM directory – they are misplaced Icons that are imported from the orginal dialog – in this case the Dialog Banner, and Client/Server icons.

 


 

To demonstrate – rename the files with BMP extension and view them as Icons:


 

Now open the SQLFinancials project that you exported the dialog into – and display the new dialog “ISI_SetupType”

 


 

 

Highlight the Server icon – and you will set it pointing to that NewBinary file. Now correctly point it to the existing icon in your directory, as shown here:

 

 


 

Now correctly point the other two icons to their icon in your directory to resolve this issue, then you can delete the NewBinary files.

 

Resolving String Table Issues

 

The string table now has entries that overwrote existing table entries – I can see this by using a tool like “BeyondCompare” to view the Before/After images of the SQLFinancials.ISM project (saved in XML format).

 

As you can see, I have the before image (Copy of SQLFinancials_B4NewDialog.ISM” on the top panel and the modified SQLFinancials.ISM on the bottom panel. Notice that “NewString1” has been overlayed with different sting values – and the checksum is different to match the new values. The same situation exists for entries “ID_STRING71” thru “ID_STRING75”.

 


 

The proper method to resolve this issue is to open the SQLFinancials project within InstallShield and follow these steps for each String table entry:

  1. Go to the new Dialog – and select the string entry “Client Workstation” and select the three dots […] to the right side of the Text entry. This opens the String Table to “NEW_STRING1”

 


 

 

  1. Copy the entry found there “{&MSSansBold8}Client Workstation”
  2. Press the + button to create a new String table – and paste that value in the field – as shown here:
  3. Repeat for each of the string table entries that were overwritten during the import of the dialog.

     


 

  1. Now Save the project in InstallShield.
  2. Open the before/after projects in BeyondCompare – and COPY each string table that was modified from the Before image to the After image. You want to ensure the entry for NEW_STRING1 in the before image is exactly like the entry in the String Table of the After project. Copy the entire line – which includes the checksum value.

 


 

Don’t manipulate the String Table outside of InstallShield

 

Now you have correctly put the String table back in sync, please don’t do what I did which caused the abort during execution. What I did was to use the BeyondCompare tool – and I copied the string value “{TahomaBold8}[ISI+PreReq2_Selection1_Title]” from the Before ISM to the After ISM for entry “NEW_STRING1”. I did not copy the corresponding checksum – this was my mistake. BAD BAD BAD L

 

Hopefully this helps you in your project development!

 

ShieldMaster

October 17, 2015

Determining Windows Operating System with WindowsBuild

Filed under: Reference Materials — shieldmaster @ 2:09 pm

With new Windows 10 Operating System, when you use a version of InstallShield older than version 2015 – you won’t be able to use the pre-defined constants. Here is the table that allows you to use WindowsBuild for InstallScript evaluation or conditional statements.

 

Windows Operating System

WindowsBuild value

Windows 2000

2195

Windows XP

2600

Windows XP Professional x64

3790

Windows Server 2003

3790

Windows Server 2003 R2

3790

Windows Vista

6000, 6001 (SP1), 6002 (SP2)

Windows Server 2008

6000

Windows Server 2008 SP1

6001 (SP1)

Windows Server 2008 SP2

6002 (SP2)

Windows 7

7600, 7601 (SP1)

Windows Server 2008 R2

7600, 7601 (SP1)

Windows 8

9200

Windows Server 2012

9200

Windows 8.1

9600

Windows Server 2012 R2

9600

Windows 10

(various, starting around 9400)

Determining Windows Operating System with VersionNT

Filed under: Reference Materials — shieldmaster @ 1:05 pm

With new Windows 10 Operating System, when you use a version of InstallShield older than version 2015 – you won’t be able to use the pre-defined constants. Here is the table that allows you to use VersionNT for InstallScript evaluation or conditional statements.

 

Windows Operating System

Windows version

Version9x

VersionNT

   

Windows 95

4.0

400

0

   

Windows 98

4.10

410

0

   

Windows Me

4.90

490

0

   

Windows NT4 (32-bit edition)

4.0

0

400

   

Windows 2000 (32-bit edition)

5.0

0

500

   

Windows XP (32-bit edition)

5.1

0

501

   

Windows XP (x64 edition)

5.2

0

502

   

Windows Server 2003 (32-bit edition)

5.2

0

502

   

Windows Server 2003 (x64 or IA64 edition)

5.2

0

502

   

Windows Server 2003 R2 (32-bit edition)

5.2

0

502

   

Windows Server 2003 R2 (x64 or IA64 edition)

5.2

0

502

   

Windows Vista (32-bit edition)

6.0

0

600

   

Windows Vista (x64 edition)

6.0

0

600

   

Windows Server 2008 (x64 or IA64 edition)

6.0

0

600

   

Windows 7 (32-bit edition)

6.1

0

601

   

Windows 7 (x64 edition)

6.1

0

601

   

Windows Server 2008 R2 (x64 or IA64 edition)

6.1

0

601

   

Windows 8 (32-bit edition)

6.2

0

602

   

Windows 8 (x64 edition)

6.2

0

602

   

Windows Server 2012 (x64 edition)

6.2

0

602

   

Windows 8.1 (32-bit edition)

6.3

0

603

   

Windows 8.1 (x64 edition)

6.3

0

603

   

Windows Server 2012 R2 (x64 edition)

6.3

0

603

   

Windows 10 (32-bit edition)

10.0*

0

1000

   

Windows 10 (x64 edition)

10.0*

0

1000

   

Windows Server 2016 (x64 edition)

10.0*

0

1000

   

Create a free website or blog at WordPress.com.