Your "temporary workaround" sounds like the proper solution. Allow
Windows Installer to request elevation if/when required rather than
forcing it everywhere from the start. If you're using a stock WiX UI
your user will be prompted with a UAC shield on the VerifyReadyDlg
before the elevation request so it shouldn't be a complete surprise.

If you elevate the Iexpress SFX package, any child processes it spawns
will also be elevated. Hence your Setup.exe will be elevated which in
turn elevates msiexec when it runs your MSI which will then elevate your
application because of the waterfall of elevated processes you have
created. If you're worried about the .NET 2.0 Framework needing
elevation, don't. You didn't write it & it's not required on Vista or
later anyway.

Palbinder Sandher 
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer

-----Original Message-----
From: Simon [mailto:xmu...@gmail.com] 
Sent: 08 April 2010 10:53
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Problems launching application after install
asnon-elevated

Hi,

I need some help in launching our Application correctly once the WiX MSI
installer has completed.

Currently I have the following setup:

(a) An IExpress Self Extracter executable.  This has a manifest set to
RunAsAdministrator for UAC compatibility.

(b) The self-extracter then runs a bootstrapper application "Setup.exe".
 This was created using Visual Studio 2005 and installs .NET 2.0 as a
prerequisite.  It then proceeds to run the MSI.  The bootstrapper also
has a manifest set to RunAsAdministrator.

(c) The bootstrapper launches the MSI which was written using WiX
version 3.0.  The MSI installs the application correctly and then shows
a checkbox in the last screen allowing the user to Launch the
Application.  The application is launched using a custom action as
follows:

    <Property Id="WixShellExecTarget" Value="[#MyApp.exe]" />
    <CustomAction Id="LaunchFile" BinaryKey="WixCA"
DllEntry="WixShellExec"
 Impersonate="yes" Execute="immediate"/>


The Problem:
--------------------
Even though the application launches correctly I have noticed that the
application is running in UAC elevated mode.  We want to make sure that
the application is not run in elevated mode as it may cause issues for
us.

Temporary Workaround:
-----------------------------------
I was able to solve this issue by setting the manifest of the
Self-Extracter and the Bootstrapper to AsInvoker.  This causes the UAC
prompt to show up half way through the MSI install, and the application
is launched correctly.
 My concern is that unless we set the Self-Extracter and Bootstrapper to
RunAsAdministraor then we will have compatibility issues when deploying
our installers.

Ideal Situation:
----------------------
Ideally we set the Self-Extracter, Bootstrapper and MSI to
RunAsAdministrator in elevated mode,  but the application is then
launched in non-elevated mode.


Does anyone know how to achieve this?  Thank you in advance for you
help!

Regards,
Simon
------------------------------------------------------------------------
------
Download Intel&#174; Parallel Studio Eval Try the new software tools for
yourself. Speed compiling, find bugs proactively, and fine-tune
applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to