#152055 - 2005-11-23 12:29 AM
Stopping a service with Kix
|
Aaron Perrault
Fresh Scripter
Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
|
OK guys, I know that this can be done, but I am having a moment right now. How do I stop a service. We want to make sure that all of our machines re-authenticate to the WSUS server every time they login, just to make sure that nothing gets missed. here is what I have:
If Exist ("%wiwndir%\system32\pskill.exe") Display ("File Exists") Else Copy @ldrive+\files\pskill.exe ("%windir%\system32") ; Run ("%windir%\system32\pskill.exe wauclt") Sleep 6 net stop "Automatic Updates" Net Start "Automatic Updates" Run ("%windir%\system32\wuauclt.exe /resetauthorization /detectnow")
I am having two problems with this code, first, if the wuault program is not running, I get an error, any thoughts on how to just allow it to continue without a response from me? Also, how do I stop then start the WSUS service ("Automatic Updates"). I know that they net stop and net srart work from a batch file, but I dont want to do it that way.
thanks much
app
|
Top
|
|
|
|
#152061 - 2005-11-23 01:33 AM
Re: Stopping a service with Kix
|
Aaron Perrault
Fresh Scripter
Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
|
Thanks guys, I will try the shell command. I dont know why I didnt think of that. I will let you know if I have any problems.
Thanks guys, as always, the greatest board on the net.
Now, just if my MSExchange boards were this responsive.
talk to y'all later.
app
|
Top
|
|
|
|
#152062 - 2005-11-23 01:35 AM
Re: Stopping a service with Kix
|
Aaron Perrault
Fresh Scripter
Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
|
hey les, i meant the wuauclt process, not a service. If my memory serves me correctly, which I am not sure it does at this point in the day, it is the AutoUpdate process for WSUS.
thanks again.
app
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 369 anonymous users online.
|
|
|