Install New Windows Services Using a ZEN Application

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.


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


  3. 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"



  4. 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.


  5. 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 hotmail.com

Labels (1)
Tags (1)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
5 of 5
Last update:
‎2020-02-18 22:26
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.