WiX installer and user actions

I have an application that is not such a simple Windows service (C #). I created the installer using Visual Studio 2008, which performed the task of installing the service on the client machine, but using the Visual Studio deployment project has 2 drawbacks:

  • I cannot force the installer to build using MSBuild (I tried the DevEnv.exe method). This service is a small part of a much larger project, and I would like the MSI file to be built at the same time as my build. I used WiX for other installers, but this particular application requires setup in setup.
  • There seems to be a bug in the VS 2008 deployment project when installing Windows services. When repairing and updating, the service never stops. (caused by the wrong sequence for RemoveExistingProducts - I worked around this by changing the sequence to 1525).

What's good about the VS2008 deployment project is that I created a custom action that shows a form that receives some information from the user, connects to the WCF service, which retrieves the data and stores it in an encrypted data store on its local machine for use by the service .

Now I looked high and low, and I don’t see it being possible with WiX. Running EXE after installing the program is not "good." I would like to be able to call a method in my custom Action DLL that displays the form and processes it. Is there any way to do this with WiX? - or even create a user interface in WiX that receives the values ​​and passes these values ​​to the processing method

So the questions are:

  • Is this possible with WiX?
  • What are my alternatives if not?

Many thanks

+3
source share
3 answers

β„–1 - , . . vb script CustomAction - . . .

+1

WiX - , : -)

ServiceInstall ServiceControl ( , ).

, (YourService.exe) , ServiceInstall (, , ServiecControl).

<Component Id='YourServiceComponent' Guid='.....' DiskId='1'>
  <File Id='YourServiceEXEFile' Name='YourService.exe' 
        src='(path to your EXE)/YourService.exe' KeyPath='yes'/>
  <ServiceInstall Id='YourServiceInstall' Name='YourServiceName' 
                  Description='.....' ErrorControl='normal' 
                  Start='auto' Type='ownProcess' Vital='yes' />
  <ServiceControl Id='UninstallYourService' Name='YourServiceName' 
                  Remove='uninstall' Wait='yes' />
</Component>

- !

+1

Note about managing the WiX Service node:

If you use the assembly services that your installer installs in the GAC, it does not start. For some reason, WiX plans a StartService action BEFORE publishing assemblies to the GAC, so if so, you will need to write your own action to start the service.

+1
source

Source: https://habr.com/ru/post/1712866/


All Articles