Page 1 of 1 1
Topic Options
#46269 - 2003-10-02 11:48 PM How to change service startup type
Ryan Dao Offline
Fresh Scripter

Registered: 2003-03-09
Posts: 45
Hi,

I was wondering if there is a way to change the service startup type. For example, change Automatic Updates service to manually start instead of automatically starting.

Thanks.

Top
#46270 - 2003-10-02 11:54 PM Re: How to change service startup type
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi Ryan, use or pick apart ServiceMode()

-Shawn

[ 02. October 2003, 23:55: Message edited by: Shawn ]

Top
#46271 - 2003-10-03 05:04 AM Re: How to change service startup type
Ryan Dao Offline
Fresh Scripter

Registered: 2003-03-09
Posts: 45
Thanks for the help. Is there an easier way? Any way to use a command line using a utility?

Thanks,

Ryan

Top
#46272 - 2003-10-03 05:05 AM Re: How to change service startup type
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Commandline util... blasphemy!

This is a KiX board!
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#46273 - 2003-10-03 05:06 AM Re: How to change service startup type
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
What could be easier than using a simple pre-written canned UDF: http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=12;t=000204

[ 03. October 2003, 05:07: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#46274 - 2003-10-03 05:08 AM Re: How to change service startup type
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
ja, check out the SC util from the NT/2K RESKIT.
Top
#46275 - 2003-10-03 05:11 AM Re: How to change service startup type
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Blasphemer!

Why not use the GUI then!?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#46276 - 2003-10-03 05:13 AM Re: How to change service startup type
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
It would be easier to use the UDF than to code SC into 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
#46277 - 2003-10-03 05:13 AM Re: How to change service startup type
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Agreed, Ryan - I recommend you use the GUI to do this as it would definitely be the easiest way.
Top
#46278 - 2003-10-03 05:19 AM Re: How to change service startup type
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Ryan, you can thank Shawn for this one: http://www.petri.co.il/download_free_reskit_tools.htm

[ 03. October 2003, 05:20: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#46279 - 2003-10-03 05:22 AM Re: How to change service startup type
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Actually Ryan, that is a very cool site to bookmark ... its got all the neat 2K reskit tools for download on one nice page ... hope it helps ...
Top
#46280 - 2003-10-03 05:49 AM Re: How to change service startup type
Ryan Dao Offline
Fresh Scripter

Registered: 2003-03-09
Posts: 45
Thanks Shawn and everyone else for helping. Will try and let everyone know.
Top
#46281 - 2003-10-03 04:19 PM Re: How to change service startup type
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Actually, there are a couple of 'service control' UDFs in the UDF forum that use various means to control services. Just use the one that suits your needs and don't forget to read the fAQ forum on how to use UDFs.

BTW, it is normally not necessary to custom modify UDFs, though if you have improvements, the UDF writers are normally more than willing to improve the UDF in question.
_________________________
There are two types of vessels, submarines and targets.

Top
#46282 - 2003-10-04 01:58 AM Re: How to change service startup type
Ryan Dao Offline
Fresh Scripter

Registered: 2003-03-09
Posts: 45
Found the registry setting for it.

hklm\system\currentcontrolset\services\servicename\startup, change it to 3 for manual start.

Go to here for more info.
http://support.microsoft.com/default.aspx?scid=kb;en-us;248660

Thanks again for everyone's help

Top
#46283 - 2003-10-04 02:00 AM Re: How to change service startup type
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Good follow-up Ryan. Doing research is the first step to providing good solutions.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#46284 - 2003-10-04 02:33 AM Re: How to change service startup type
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
The ServiceMode() - Checks/sets the startup mode of a service UDF is using this type or registry key/value manipulation to get/set the service startup mode.
_________________________
There are two types of vessels, submarines and targets.

Top
#46285 - 2003-10-04 02:47 AM Re: How to change service startup type
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Well I see Jens pointed you to a UDF that does it via that method already.
Here is the MSKB article though for manipulating the Automatic Updates
as well as a trimmed down version of Jens UDF.





; Microsoft Knowledge Base Article - 328010
; How to Configure Automatic Updates by Using Group Policy or Registry Settings
; http://support.microsoft.com/?kbid=328010

SetServiceMode(,'Norton AntiVirus Server',2)
? 'Return value for updating key: '+@error+' '+@serror

Function SetServiceMode(optional $RemotePC,$Service,$StartValue)
DIM $SetMode
if len($RemotePC) $RemotePC=iif("\\"=left($RemotePC,2),$RemotePC,"\\"+$RemotePC)+"\" endif
$SetMode=writevalue($RemotePC+'HKLM\SYSTEM\CurrentControlSet\Services\'+$Service,'Start',$StartValue,'REG_DWORD')
EndFunction



[ 04. October 2003, 19:21: Message edited by: NTDOC ]

Top
#46286 - 2003-10-04 03:24 AM Re: How to change service startup type
Ryan Dao Offline
Fresh Scripter

Registered: 2003-03-09
Posts: 45
This forum has the best and faster replies of all the forum I've used. Including MS's forum. Thanks again for all the help and hope I can help in the future.

Ryan

Top
#46287 - 2003-10-04 02:56 PM Re: How to change service startup type
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Ryan,
I still fail to understand why you would not use one of the UDFs suggested. Far easier than finding the reg key and hacking the reg.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#46288 - 2003-10-04 04:25 PM Re: How to change service startup type
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Ryan might not have realized how easy UDFs are to use and what wide selection of UDFs we're offering.
_________________________
There are two types of vessels, submarines and targets.

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
0 registered and 507 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.07 seconds in which 0.023 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