Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Did you add the custom actions into the MSI? If you don't have a custom action fire for your uninstall event then I'm not sure if these events will be called. Is there any reason why you are using the before and after install events instead of overriding the "uninstall" command?</p> <p>If you don't call the Install function for the component, then the installer won't call the uninstall function either. You can program a messagebox into the uninstall (or a <code>System.Diagnostics.Debugger.Attach()</code>) if you want to see whether the code is executing or not. </p> <p>Also as a matter of portability, I highly recommend that you use the <code>Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)</code> command to find the program files directory. This will port across x64 and x86 as well as any future revisions to the program files directory in the future.</p> <p>Secondly I would use the <code>Path.Combine</code> function as well to safely merge the folders together.</p> <p>EDIT: I think you may be misusing the installation procedure. The custom action of the installer is to "register" the service once it has been installed by the MSI. It is also to unregister the service before it is then deleted by the MSI.</p> <p>Go get a copy of WIX or use the MSI builder in Visual Studio. Drop your project output for your service into the project, setup the custom actions to call on your service exe and then the MSI will handle the install/uninstall for you. THe custom action will be called and register/unregister your service with the cache.</p> <p>Be very careful though, if you need to upgrade there is a bug in the behaviour of the service installer, it is not able to succesfully upgrade or downgrade without you wiring the MSI properly to handle all the sequences that can occur.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload