Install New Windows Services Using a ZEN Application


I wrote a Windows service called "Power Miser" that works with our WOL solution. It essentially counts time from boot to login and if it reaches 30 minutes without a login, it will power down the machine. No sense consuming electricity all day if the user is taking a day off!

But how to distribute this to all of my XP workstations???

ZENworks App time!!!

I created a ZEN App to handle the distribution.

  1. SC.exe can be used at a command line to add a new service to windows XP. I copied this to "Public" so that everyone can run it.

  • I copied my "PwrMiser.exe" service to the same location so that it can be copied from there.

  • I created a ZEN App that runs the command line...
    \\{SERVER NAME}sys\public\sc.exe create "Power Miser" binPath= "C:\windows\system32\PwrMiser.exe" start= "auto"

  • I also told the ZEN App to copy the service's .exe to the local windows/system323 folder, and to force run the app when associated.

  • It is also good to tell the ZEN App to only run when the registry key for this service does not exist. That way it will run once to install the app, but if the app is correctly installed, and the registry key exists, then the app won't fire again for that workstation.

darronmichael842 at



How To-Best Practice
Comment List