GPO to lauch a VBS

jameswhite1979

Senior member
Apr 15, 2005
367
0
0
We want to have a local vbs which checks for a windows service is running and if not to start it backup. We want to run this via a GPO from the network.

1. Is this the best approach when using a GPO?
2. Should the file be hosted in %netlogon% or other remote location?
2. What type of GPO should be used?

Any other thoughts and ideas welcome.

James
 

KB

Diamond Member
Nov 8, 1999
5,406
389
126
A GPO is a good way to run scripts since it gives you fine grain control over who will run it. Yes it should be in the netlogon share and I would set it against a computer GPO, that way users logging into servers don't run it.

GPOs allow you to set a VBS file as either a login or logout script. Problem is they don't let you set the script to run every X hours as you mention in your topic summary. If you go the login script route you can have the script run a loop, sleep say 5 minutes then perform the check (not a good solution since Wscript.exe is always busy. Also be sure to run scripts asynchronously during login or the login process will never finish). Another choice is create "scheduled task" local on the PC to run the script every X minutes. This task could be automated to all PCs in your network using your software distribution mechanism, like Alitirs or SMS.
 

jameswhite1979

Senior member
Apr 15, 2005
367
0
0
Thanks KB some great information. You mention Altiris it is the Altiris service that we are wanting to check is running and if not restart. Our users are local admins to their machines to they often stop/uninstall Altiris. I think that I will host the small VBS to check and restart each start up but placing a wscript.sleep to allow the Altiris time to start up.