Wix Installer starting a service only if it was already running -
in wix installer, how make installer start service if started/running , stopped installer during update process?
edit clarify, have service component of installer installed based upon parameters. problem having if set , service started regardless of state prior installation. service start if running prior running of wix installer.
as suggested above need run custom action using c# example:
servicecontroller sc = new servicecontroller(servicename); switch (sc.status) { case servicecontrollerstatus.running: return "running"; case servicecontrollerstatus.stopped: return "stopped"; case servicecontrollerstatus.paused: return "paused"; case servicecontrollerstatus.stoppending: return "stopping"; case servicecontrollerstatus.startpending: return "starting"; default: return "status changing"; }
Comments
Post a Comment