Page 1 of 1 1
Topic Options
#141438 - 2005-06-10 11:51 AM Service stop/start/query - n WMI
awheelhouse Offline
Fresh Scripter

Registered: 2005-06-02
Posts: 11
Loc: Leeds, UK
Is there a function that works with services without the remote computer having WMI installed? I've tried searching, but the internet connection at work is very poorly at the moment, and search results take ages to appear, and I often lose the connection.

Can someone point me in the right direction?

thanks

Top
#141439 - 2005-06-10 12:34 PM Re: Service stop/start/query - n WMI
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1341
Loc: NL
Schedule a script on the remote pc in which you use something like net stop , net start or kill.exe
_________________________
Co


Top
#141440 - 2005-06-10 12:41 PM Re: Service stop/start/query - n WMI
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1341
Loc: NL
Oh and you can use the ScheduleTask() UDF to schedule the task on the remote pc...
_________________________
Co


Top
#141441 - 2005-06-10 02:51 PM Re: Service stop/start/query - n WMI
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
And what is wrong with XNet?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#141442 - 2005-06-10 03:01 PM Re: Service stop/start/query - n WMI
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1341
Loc: NL
Nothing... It just didn't came up to me.
_________________________
Co


Top
#141443 - 2005-06-11 05:09 AM Re: Service stop/start/query - n WMI
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
See the UDF Mirror for a one-stop list of UDFs. What exactly do you need to accomplish?
_________________________
There are two types of vessels, submarines and targets.

Top
#141444 - 2005-06-13 11:47 AM Re: Service stop/start/query - n WMI
awheelhouse Offline
Fresh Scripter

Registered: 2005-06-02
Posts: 11
Loc: Leeds, UK
sealeopard,

I need to stop 4 services, this is the original batch file code:-

sc \\%1 stop "AlertManager"
sc \\%1 stop "McAfeeFramework"
sc \\%1 stop "McTaskManager"
sc \\%1 stop "MCSHIELD"

and then make some changes to reg keys and restart the services

I'm doing this at the moment:-

Run 'c:\software\kix\sc.exe \\'+$Computer +' stop "AlertManager"'
Run 'c:\software\kix\sc.exe \\'+$Computer +' stop "McAfeeFramework"'
Run 'c:\software\kix\sc.exe \\'+$Computer +' stop "McTaskManager"'
Run 'c:\software\kix\sc.exe \\'+$Computer +' stop "MCSHIELD"'

But it would be neater to do it without using sc.exe

thanks

Top
#141445 - 2005-06-13 01:42 PM Re: Service stop/start/query - n WMI
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Since services are not handled directly by KiX it becomes a matter of preference. Use whatever works best for you, be it SC, XNET, WMI, or ADSI. Whatever method you choose, won't fix your internet connection issues while running the script remotely.
Top
#141446 - 2005-06-13 02:18 PM Re: Service stop/start/query - n WMI
awheelhouse Offline
Fresh Scripter

Registered: 2005-06-02
Posts: 11
Loc: Leeds, UK
Chris,

My internet issues were just related to my own internet access, not running the scripts. I was having problems on friday using the forum. I'm ok using SC, just wanted to know if there was a kix function that was neater that didn't use WMI and I couldn't search for it.

thanks

thanks

Top
#141447 - 2005-06-13 02:23 PM Re: Service stop/start/query - n WMI
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Yes, it is called XNET and ships with KiX.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#141448 - 2005-06-13 02:29 PM Re: Service stop/start/query - n WMI
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Ah, well I have to agree with Les and the others who have suggested XNET then. XNET is an excellent utility for querying and controlling services both locally and remotely. Use it in conjunction with one of the pipe functions (I suggest WSHPipe()) to retrieve the results of your status queries.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.065 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org