Login | |
|
 |
RE: start a windows service, using vbs - 12/29/2006 8:28:02 AM
|
|
 |
|
| |
dm_4ever
Posts: 2721
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
In the for each you would use something like objItem.ChangeStartMode("Manual") or Automatic or any of the other option you can find by clicking on the link under methods labeled ChangeStartMode found on the link provided.
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: start a windows service, using vbs - 12/29/2006 9:13:29 AM
|
|
 |
|
| |
dm_4ever
Posts: 2721
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
then simply do objItem.StartService Play around with the example provided and the various methods and properties available which are all described in the link for Win32_Service
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: start a windows service, using vbs - 12/30/2006 3:12:34 AM
|
|
 |
|
| |
dm_4ever
Posts: 2721
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
I do believe everything needed has been covered. If the service is disabled, then change its start mode so it is no longer disabled. Then, you start the service. I know this can be done. How about posting what you have or have tried?
< Message edited by dm_4ever -- 12/30/2006 5:15:06 AM >
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: start a windows service, using vbs - 1/2/2007 12:09:21 AM
|
|
 |
|
| |
mbouchard
Posts: 1922
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
Take a look at sc.exe It is on WinXP/Vista by deafult and can be copied to 2000 as needed (use the XP version) you can start, stop, query, set persistant status etc.
_____________________________
Mike For useful Scripting links see the Read Me First stickey! Always remember Search is your friend.
|
|
| |
|
|
|
|
|