[wix-users] Elevated CA before GUI?
Phill Hogland
phill.hogland at rimage.com
Wed Aug 17 06:32:54 PDT 2016
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/
More information about the wix-users
mailing list