Cool Solutions

Install New Windows Services Using a ZEN Application



By:

April 23, 2009 2:29 pm

Reads:6,288

Comments:0

Score:Unrated

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

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading ... Loading ...

Tags:
Categories: Uncategorized

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS