|
|
|||||||
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 |
||||||||
|
|
|||||||
Schedule a script on the remote pc in which you use something like net stop , net start or kill.exe |
||||||||
|
|
|||||||
Oh and you can use the ScheduleTask() UDF to schedule the task on the remote pc... |
||||||||
|
|
|||||||
And what is wrong with XNet? |
||||||||
|
|
|||||||
Nothing... It just didn't came up to me. |
||||||||
|
|
|||||||
See the UDF Mirror for a one-stop list of UDFs. What exactly do you need to accomplish? |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
Yes, it is called XNET and ships with KiX. |
||||||||
|
|
|||||||
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. |