2

I have InstallScript Project created with InstallShield X (Version 10.5)

When I run mt.exe from Windows SDK v7.1A with the following manifest:

MySetup.exe.manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel
          level='requireAdministrator'
          uiAccess='false'
        />
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

using the following command:

# wrong file! MySetup.exe will be truncated!    
mt.exe -manifest MySetup.exe.manifest -updateresource:MySetup.exe;#1

the installer (MySetup.exe) is truncated from ~80 MB to ~110 KB. How do I properly embed Admin Privilege Elevation manifest to the installer generated by InstallShield X?

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
Afriza N. Arief
  • 7,696
  • 5
  • 47
  • 74
  • FYI, InstallShield version 12 introduced support for UAC and the corresponding manifests. InstallShield 10.5 is almost ten years old now, and was not designed for use on Vista and later. (Microsoft does a good job at backwards compatibility, so that's less of a problem than it otherwise might be.) – Michael Urman Mar 13 '14 at 12:15
  • If upgrading is free, then we will upgrade. Otherwise, since we are using it only for 1 internal project, it is not an option. – Afriza N. Arief Mar 14 '14 at 02:19

2 Answers2

3

There is a downloadable tool from InstallShield which modifies the manifest of a built setup.exe or update.exe. At this point I don't recall which versions of InstallShield's output it works with. It will remove digital signatures as it modifies the contents of the .exe file.

http://support.installshield.com/kb/view.asp?articleid=Q113245

(As a disclaimer I am paid to work on the product. I still recommend instead using a version of InstallShield which offers the option to select a manifest. I believe that's InstallShield 12 for MSI setup.exe, and something later such as InstallShield 2010 or InstallShield 2011 for InstallScript setup.exe and MSI update.exe files.)

Michael Urman
  • 15,737
  • 2
  • 28
  • 44
0

Use the mt.exe tool to update the manifest of the following files (make a backup first!)

C:\Program Files\InstallShield 10.5\Redist\Package Stub\Setup.exe
C:\Program Files\InstallShield 10.5\Redist\Uncompressed Files\Language Independent\Intel 32\setup.exe
C:\Program Files\InstallShield 10.5\Support\Dialog Sampler\Media\Default\Disk Images\Disk1\setup.exe
C:\Program Files\InstallShield 10.5\Support\Dialog Sampler\Media\Skin\Disk Images\Disk1\setup.exe

with the same command as in the question

mt.exe -manifest Setup.exe.manifest -updateresource:Setup.exe;#1

and then rebuild the installer

If this doesn't work, then as pointed out by Michael Urman in his comment, you need to update the manifest for other stubs. The way I look for the stubs is by recursively search the string 6595b64144ccf1df using Notepad++ in InstallShield installation folder. This value is the publicKeyToken that I find in the manifest of my final installer.

You can use any resource editor like XNResourceEditor or mt.exe to extract the manifest and search for files that contain similar manifest under InstallShield installation folder.

Community
  • 1
  • 1
Afriza N. Arief
  • 7,696
  • 5
  • 47
  • 74
  • 1
    Note that there is a different stub file for Basic MSI or InstallScript MSI projects (instead of "pure" InstallScript projects) . – Michael Urman Mar 13 '14 at 12:16