cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mrspreadsheet
Level 4

Embedding Manifest problem for Vista's UAC (mt.exe)

Hi,

I am using mt.exe to embed the manifest file "setup.exe.manifest" to "setup.exe" (size approx. 5MB). After embedding the manifest, the new setup.exe size shrinks to approx 400KB.

setup.exe was created InstallShield 2009, and all files are compressed inside this file. Project type is a standard MSI project. I am using the command line:
mt.exe -manifest "setup.exe.manifest" -outputresource:"setup.exe";#1

I tried using two different versions of mt; one included with Platform SDK, and other with Visual Studio 2005.

I need someone to tell me how to get proper results using this tool?? Thanks
Labels (1)
0 Kudos
8 Replies
thepeter
Level 7

try this:
mt.exe -manifest "setup.exe.manifest" -outputresource:"setup.exe;#1"
0 Kudos
Holger_G
Level 10

Why do you use mt.exe to embed a manifest into Setup.exe? Do you need additional stuff inside the manifest?
Setup.exe created by InstallShield since IS 2008 includes embedded manifest info to be more Vista compatible (requestedExecutionLevel).
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Assuming you are talking about a compressed single-exe build, there is data attached to the exe which is not represented in ways mt understands. Thus when it modifies the file, it may truncate it as you've seen. Ideally you could set this before build, either choosing the correct execution level on your release or, if you need additional information, adding it to the files in the Support folder of the InstallShield install (SetupExe.*.manifest). If that's not sufficient, you could try the IsReMan tool, available from KB article Q113245.
0 Kudos
mrspreadsheet
Level 4

nope, your approach also truncates the file..

thepeter wrote:
try this:
mt.exe -manifest "setup.exe.manifest" -outputresource:"setup.exe;#1"
0 Kudos
mrspreadsheet
Level 4

MichaelU wrote:
Assuming you are talking about a compressed single-exe build, there is data attached to the exe which is not represented in ways mt understands. Thus when it modifies the file, it may truncate it as you've seen. Ideally you could set this before build, either choosing the correct execution level on your release or, if you need additional information, adding it to the files in the Support folder of the InstallShield install (SetupExe.*.manifest). If that's not sufficient, you could try the IsReMan tool, available from KB article Q113245.


Thanks, your approach works however I am getting a runtime error; this is probably because the setup.exe from the link you provided is for IS 12, and I am using version 2009. Do you perhaps have the links to the latert version of IS for the "setup.exe"?
0 Kudos
mrspreadsheet
Level 4

MichaelU, the correct execution level is already specified in:

Installation Information -> General Information -> Summary Information Stream -> Require Administrative Privileges -> Yes

But Vista ignores this (did you have this setting in mind?).

The manifest *is* embedded by "reman" tool and Vista shows the "shield" (admin) icon. When I try running the new setup.exe I get Microsoft Visual C++ Runtime Error - abnormal program termination. I am embedding the file:

C:\program Files\InstallShield\2009\support\SetupExe.Admin.manifest
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I had a different setting in mind. The one you reference tells MSI whether to prompt for UAC (if necessary) when starting the execute sequence. We have another option on the releases view (Media > Releases > your release node > Setup.exe tab > Required Execution Level) which specifies the manifest setting to use. It is set to Invoker by default for Basic MSI projects, as that is what Microsoft recommends.
0 Kudos
mrspreadsheet
Level 4

I wasn't even aware this option existed. This has solved my problem. Thank you!
0 Kudos