locked
Making msi-files in Visual Studio 2010 Installer RRS feed

  • Question

  • hello! I have one windows application installed with 2 services. I am trying to make msi-package of patch to this application. Problem: installer must to delete one old service and to stop another one. then it must to update dll-files(copy and register). after that installer must to call an exe-file. Is it possible by using vs2010? Please,tell me how to stop and delete services. i can't find any information... Thanx a lot!
    • Edited by nel4work Wednesday, March 16, 2011 1:36 PM
    Monday, March 14, 2011 10:37 AM

Answers

  • It's not possible to stop services with a custom action. Install custom actions are run after the files are all installed, which is too late to prevent issues with files being updated.

    The normal way to stop services is with the built-in ServiceControl table in Windows Installer. Unfortunately Visual Studio setups don't have IDE support for that so you'd use Orca.

    http://msdn.microsoft.com/en-us/library/aa371634(v=vs.85).aspx 

     


    Phil Wilson
    Monday, March 14, 2011 9:29 PM

All replies

  • Stopping services before you replace the files, and calling your app should be possible with windows installer custom actions. For sql-query you should use a custom action (create a dll that contains all necessary database manipulations and call it from the installer).

    Monday, March 14, 2011 2:13 PM
  • It's not possible to stop services with a custom action. Install custom actions are run after the files are all installed, which is too late to prevent issues with files being updated.

    The normal way to stop services is with the built-in ServiceControl table in Windows Installer. Unfortunately Visual Studio setups don't have IDE support for that so you'd use Orca.

    http://msdn.microsoft.com/en-us/library/aa371634(v=vs.85).aspx 

     


    Phil Wilson
    Monday, March 14, 2011 9:29 PM
  • Hi nel4work,

    I am writing to check the status of the issue on your side. 

    What about this problem now? 

    Would you mind letting us know the result of the suggestions?

    I think the solution from PhilWilson can solve your request.

     

    Best wishes,

     


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 17, 2011 3:39 AM
  • The normal way to stop services is with the built-in ServiceControl table in Windows Installer. Unfortunately Visual Studio setups don't have IDE support for that so you'd use Orca.

    Right. I thought that ServiceControl entries are also some sort of custom actions.
    Thursday, March 17, 2011 9:17 AM
  • For WiX you should be posting to the WiX users mailing list.

    and http://www.tramontana.co.hu/wix/

    http://blogs.technet.com/b/alexshev/archive/2008/02/10/from-msi-to-wix.aspx 


    Phil Wilson
    Wednesday, March 23, 2011 4:53 PM