DrJones wrote:Our installer runs two applications that are installers for other programs bundled with ours.
Hello DrJones,
are these two Windows Installer packages? As far as I know only one Windows Installer package can be executed/installed at the same time.
Is there a way to execute these custom actions with the "run as administrator" option (or something that will have the same effect)?
You can set the execution level of any .exe file by changing it's embedded manifest or by placing a "myfile.exe.manifest" (for a file called "myfile.exe") with a respective manifest.
We use this basic manifest usually:
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="TeamDrive"
type="win32">
</assemblyIdentity>
<description>TeamDrive</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="RequireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Depending on the requirements you may have to temper with uiAccess and others, too. (You should probably first extract the manifest (mt.exe) from the exe files and just add the necessary bits to ensure nothing is missing or configured incorrectly.)
One problem with flagging the exe files like that is that the elevation prompt usually ends up in the background/blinking on the task bar. So unless the user notices that (have enough items on the task bar and then you won't), he'll sit there thinking "Well? Does it proceed or not?". (That's when he'll seriously consider the "cancel" button on currently displaying installer page...)
With best regards
Clemens Anhuth
FOLLOW US
Get the latest news in Application Packaging