NET Start / Stop Help needed

Soldato
Joined
19 Oct 2002
Posts
6,899
Location
Bath
Hi Guys i need to pick your brains.

Im running XP Home on a nasty 2gh celeron with only 256mb of ram and its like a dog :( Im trying to save resources by only enabling services when they are needed via the "NET START" and "NET STOP" commands but i have a problem.

With the Automatic Updates service it must be set to automatic for the auto update website to work. I can start and stop it ok but i need to change it from manual to automatic without having to open the services.msc everytime i want to update.

Is this possible?

here is the cmd script im using at the moment.
Code:
net start "Automatic Updates"
net start "Background Intelligent Transfer Service"
start /D%SystemRoot%\system32\ /wait wupdmgr.exe
 
should be possible. Here is the script i use for my oracle database:
Code:
cls
@ECHO OFF
ECHO. ***********************************
ECHO. ** Starting Oracle Services........
ECHO. ***********************************
net start OracleServiceTOMDATABASE
net start OracleTomDatabaseTNSListener

Not sure about words with a space in them though...
 
starting them and stoping them is not the problem what i need it to do is set "Automatic updates" service from manual to automatic aswell as start the service.
 
Last edited:
Hi, i'd recommend using "PsService" by Sysinternals, you can download it from here.

I use it on user's PC's at work to enable or disable the firewall, ICS and the automatic updates from their logon scripts.

If you want to query the status of the service run this:
Code:
psservice config wuauserv
To disable service:
Code:
psservice setconfig wuauserv disabled
To enabled service:
Code:
psservice setconfig wuauserv auto
Now you could then just use the net config start/stop as usual, or PsService also will do that.

Here are all the options:
Code:
PsService v2.13 - Service information and configuration utility
Copyright (C) 2001-2004 Mark Russinovich
Sysinternals - www.sysinternals.com

PsService lists or controls services on a local or remote system.

Usage: psservice [\\Computer [-u Username [-p Password]]] <cmd> <optns>
Cmd is one of the following:
   query      Queries the status of a service
   config     Queries the configuration
   setconfig  Sets the configuration
   start      Starts a service
   stop       Stops a service
   restart    Stops and then restarts a service
   pause      Pauses a service
   cont       Continues a paused service
   depend     Enumerates the services that depend on the one specified
   find       Searches for an instance of a service on the network
Use the username and password to log into the remote computer in cases where
your account does not have permissions to perform the action you specify.

Omitting a command queries the active services on the specified computer.
Enter -? for help on a particular command.
 
Back
Top Bottom