Starting/Stopping NT Services 
Author Message
 Starting/Stopping NT Services

Hi,

I'm looking for a way to stop and start services using
WSH/VBScript, but NOT WMI.  I have tried using
WshShell.Run ("net start/stop...",0,True) but I'm not
satisfied with the returns that I'm getting.  When it
fails, the return is always '2', regardless of the reason
for failure.

Ideally, what I would like are the same responses that I
get when 'net start/stop' from the command line fails:

More help is available by typing NET HELPMSG xxxx.

I want xxxx returned to my script.

Any help would be appreciated.

Thanks,
Joe



Sun, 11 Jan 2004 22:59:26 GMT  
 Starting/Stopping NT Services
You can use the ADSI for it?

Bobby
www.Adminscripts.net


Quote:
> Hi,

> I'm looking for a way to stop and start services using
> WSH/VBScript, but NOT WMI.  I have tried using
> WshShell.Run ("net start/stop...",0,True) but I'm not
> satisfied with the returns that I'm getting.  When it
> fails, the return is always '2', regardless of the reason
> for failure.

> Ideally, what I would like are the same responses that I
> get when 'net start/stop' from the command line fails:

> More help is available by typing NET HELPMSG xxxx.

> I want xxxx returned to my script.

> Any help would be appreciated.

> Thanks,
> Joe



Sun, 11 Jan 2004 23:34:52 GMT  
 Starting/Stopping NT Services
Bobby,

Can you elaborate?  I haven't used ADSI.  Does it come
with NT 4.0?

Thanks,
Joe

Quote:
>-----Original Message-----
>You can use the ADSI for it?

>Bobby
>www.Adminscripts.net



>> Hi,

>> I'm looking for a way to stop and start services using
>> WSH/VBScript, but NOT WMI.  I have tried using
>> WshShell.Run ("net start/stop...",0,True) but I'm not
>> satisfied with the returns that I'm getting.  When it
>> fails, the return is always '2', regardless of the
reason
>> for failure.

>> Ideally, what I would like are the same responses that I
>> get when 'net start/stop' from the command line fails:

>> More help is available by typing NET HELPMSG xxxx.

>> I want xxxx returned to my script.

>> Any help would be appreciated.

>> Thanks,
>> Joe

>.



Mon, 12 Jan 2004 00:25:15 GMT  
 Starting/Stopping NT Services
No it does not come with Windows NT 4.0. You can download the adsi module
and install it on the machine that you want to run the script on. This is
the only place you need to install it.

You can download it from
http://www.microsoft.com/windows2000/techinfo/howitworks/activedirect...
ilinks.asp.
It is very easy to use. I have a script that I wrote long time back (a year
or two) to monitor service using adsi. I will look for it and send it to you
later (I don't have it in the office).

You should also download the adsi samples , usersindomain and computers in
domain from www.adminscripts.net

Bobby


Quote:
> Bobby,

> Can you elaborate?  I haven't used ADSI.  Does it come
> with NT 4.0?

> Thanks,
> Joe
> >-----Original Message-----
> >You can use the ADSI for it?

> >Bobby
> >www.Adminscripts.net



> >> Hi,

> >> I'm looking for a way to stop and start services using
> >> WSH/VBScript, but NOT WMI.  I have tried using
> >> WshShell.Run ("net start/stop...",0,True) but I'm not
> >> satisfied with the returns that I'm getting.  When it
> >> fails, the return is always '2', regardless of the
> reason
> >> for failure.

> >> Ideally, what I would like are the same responses that I
> >> get when 'net start/stop' from the command line fails:

> >> More help is available by typing NET HELPMSG xxxx.

> >> I want xxxx returned to my script.

> >> Any help would be appreciated.

> >> Thanks,
> >> Joe

> >.



Mon, 12 Jan 2004 02:04:40 GMT  
 Starting/Stopping NT Services
No it does not come with Windows NT 4.0. You can download the adsi module
and install it on the machine that you want to run the script on. This is
the only place you need to install it.

You can download it from
http://www.microsoft.com/windows2000/techinfo/howitworks/activedirect...
ilinks.asp.
It is very easy to use. I have a script that I wrote long time back (a year
or two) to monitor service using adsi. I will look for it and send it to you
later (I don't have it in the office).

You should also download the adsi samples , usersindomain and computers in
domain from www.adminscripts.net

Bobby


Quote:
> Bobby,

> Can you elaborate?  I haven't used ADSI.  Does it come
> with NT 4.0?

> Thanks,
> Joe
> >-----Original Message-----
> >You can use the ADSI for it?

> >Bobby
> >www.Adminscripts.net



> >> Hi,

> >> I'm looking for a way to stop and start services using
> >> WSH/VBScript, but NOT WMI.  I have tried using
> >> WshShell.Run ("net start/stop...",0,True) but I'm not
> >> satisfied with the returns that I'm getting.  When it
> >> fails, the return is always '2', regardless of the
> reason
> >> for failure.

> >> Ideally, what I would like are the same responses that I
> >> get when 'net start/stop' from the command line fails:

> >> More help is available by typing NET HELPMSG xxxx.

> >> I want xxxx returned to my script.

> >> Any help would be appreciated.

> >> Thanks,
> >> Joe

> >.



Mon, 12 Jan 2004 02:04:56 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How to start/stop a NT service

2. Stop and Starting Services on NT

3. Starting and Stopping NT Services with ADSI,wsh, and VBScript

4. Start/Stop a NT Service using wsh/adsi

5. Starting and stopping NT services

6. How to start/stop a NT service...

7. Script To Stop/Start NT Service

8. Starting and Stopping NT Services from WSH/VBS

9. Stopping and Starting NT Services

10. Stopping and Starting NT Services

11. Stop/Start NT Services

12. Start/Stop a NT Service using wsh/adsi

 

 
Powered by phpBB® Forum Software