[wix-users] Elevated CA before GUI?

Robert Goodridge robert.goodridge at lansa.com.au
Thu Aug 18 15:10:28 PDT 2016


Thank you Bob..

Where do I and the OP find information on :
* There's existing built-in and standard functionality that solves the problem?

Warm regards

Rob Goodridge | CloudArchitect | LANSA Product Centre

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Bob Arnson
Sent: Friday, 19 August 2016 3:09 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Elevated CA before GUI?

I wouldn't recommend it:

* It relies on an undocumented implementation detail.
* It breaks the ability to use the .msi normally outside the bundle.
* There's existing built-in and standard functionality that solves the problem.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Robert Goodridge
Sent: Wednesday, 17 August, 2016 20:37
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Elevated CA before GUI?

OK. I'm wrong on the mechanism. The point is that all the MSI processes run elevated. That's what I see. That's what I believe the OP wants to achieve. So my solution seems simple and correct. I think it would set the OPs mind at rest if you can concur that the solution will work.

Warm regards

Rob Goodridge | CloudArchitect | LANSA Product Centre

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Bob Arnson
Sent: Thursday, 18 August 2016 9:50 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Elevated CA before GUI?

I was replying to your comment: "The executable it produces contains a manifest that runs the process elevated." That's not the case.

<requestedExecutionLevel level="asInvoker" uiAccess="false"/>

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Robert Goodridge
Sent: Wednesday, 17 August, 2016 19:28
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Elevated CA before GUI?

I haven't touched Burn. Out of the box, this is what it does in 3.10.3. The whole process of the MSI is run elevated. The whole process. This is a fact. No hacking.

Warm regards

Rob Goodridge | CloudArchitect | LANSA Product Centre

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Bob Arnson
Sent: Thursday, 18 August 2016 9:25 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Elevated CA before GUI?

Burn never elevates at launch. If you replace the manifest, you're hacking Burn in a way it wasn't designed or tested for.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Robert Goodridge
Sent: Wednesday, 17 August, 2016 18:58
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Elevated CA before GUI?

In order to elevate the GUI part of the process you may wrap it in a Bundle. The executable it produces contains a manifest that runs the process elevated. We had a similar requirement to yours and this was the only solution we could find.

A simple Bundle that just wraps your msi like this. Note that the UpgradeCode and RelatedBundle Id values are critical, hence I've listed 3 bundles below, 1st MSI, a Patch and a 2nd MSI. This link talks about how the GUIDs need to match or be a unique: http://stackoverflow.com/questions/38840748/wix-bundle-patches-for-1-0-0-are-not-removed-from-programs-features-when-bund/38840749#38840749
:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Bundle Name="Burn Installer" Version="1.0.0" Manufacturer="LANSA" UpgradeCode="AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" Copyright="..." AboutUrl="...">
    <RelatedBundle Id="BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB" Action="Detect" />
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
    <Chain>
      <MsiPackage Id="MainPackage" SourceFile="TESTLIST_v1.0.0_en-us.msi" Vital="yes" DisplayInternalUI="yes" />
    </Chain>
  </Bundle>
</Wix>

And patches like this:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Bundle Name="Patch 1.0.0.1" ParentName="Burn Installer" Version="1.0.0.1" Manufacturer="LANSA" UpgradeCode="CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC" Copyright="..." AboutUrl="...">
    <RelatedBundle Id="BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB" Action="Patch"/>     
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
    <Chain>
      <MspPackage Id="Patch" SourceFile="TESTLIST_v1.0.0.1_en-us.msp" Vital="yes" DisplayInternalUI="no" PerMachine="yes" Permanent="no"/>
    </Chain>
  </Bundle>
</Wix>

And another MSI to upgrade:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Bundle Name="Burn Installer" Version="2.0.0" Manufacturer="LANSA" UpgradeCode="AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" Copyright="..." AboutUrl="...">
   <RelatedBundle Id="DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD" Action="Detect" />
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
    <Chain>
      <MsiPackage Id="MainPackage" SourceFile="TESTLIST_v2.0.0_en-us.msi" Vital="yes" DisplayInternalUI="yes" />
    </Chain>
  </Bundle>
</Wix>
Warm regards

Rob Goodridge | CloudArchitect | LANSA Product Centre

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phill Hogland
Sent: Wednesday, 17 August 2016 11:33 PM
To: wix-users at lists.wixtoolset.org
Subject: Re: [wix-users] Elevated CA before GUI?

I have not needed either CloseApplication (or to role my own CA, for hundreds of different scenarios), as RestartResource fits the bill to stop a resource prior to doing the file copy.  There are some special situations (in a per-user setup when the service is running under a different user context) where the attempt to stop the resource is 'best-effort', but you would have that issue if you tried to use CloseApplication or your own CA, as well.  But for most scenarios RestartResource is a seamless solution.


Also we had a window-less background "tray" application which would not respond to either CloseApplication or RestartResource, as the application must have a message pump and respond to the window's messages.  For that I pushed back on the application design and they added a hidden window with a message pump so that RestartResource could be used to stop and manage that application.

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Persson, Magnus (SE-TLX) <magnus.persson at assaabloy.com>
Sent: Wednesday, August 17, 2016 8:09:39 AM
To: wix-users at lists.wixtoolset.org
Subject: Re: [wix-users] Elevated CA before GUI?

I am fairly new to WiX and have not yet looked at the util schema.
Perhaps that will work.
It would be nicer to stop our services and kill our processes from WiX instead of asking the user to do it manually and restart the msi/setup-file.

I see there is a 'TerminateProcess' attribute to the CloseApplication util. As long as this can be called before the file copy process starts it will be fine.

The RestartResource sound like it will restart the service. What I need is to stop the service. Can this be done?

Regards,
Magnus

On 2016-08-17 14:23, Phill Hogland wrote:
> Have you considered using the Restart Manager:
>
>      <util:RestartResource ServiceName="My_service_Short_Name"/>
>      <util:RestartResource ProcessName="MyApp.exe"/>
>
>
> ________________________________
> From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of 
> Persson, Magnus (SE-TLX) <magnus.persson at assaabloy.com>
> Sent: Wednesday, August 17, 2016 2:35:54 AM
> To: wix-users at lists.wixtoolset.org
> Subject: [wix-users] Elevated CA before GUI?
>
> I need to call a CustomAction before the GUI part is shown to check if 
> services or processes that are part of our software suite is running 
> and if so, tell the user to terminate the running application and 
> restart the installer when done.
>
> The problem is that the 'process snapshot' APIs do require elevated 
> rights and I do not know how to do that in the InstallUISequence.
>
> I use the CA to set conditional properties that will trigger the error 
> message so running the CA as deferred will be too late for that.
>
> Any ideas how to solve it in a better way?
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/
>
>
>   
> ----------------------------------------------------------------------
> ------------------------ This E-mail is PLAIN text, not support HTML, 
> see instruction below on how to report SPAM.
> ----------------------------------------------------------------------
> ------------------------- To submit spam as an attachment to an email 
> message using a mail client:
> 1. Open a new email message.
> 2. Drag the spam email from the Inbox into the new email message.
> 3. Enter asa at websense.com in the To field.
> 4. Click Send.
> ----------------------------------------------------------------------
> -------------------------

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list