Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - scripting msconfig

Reply
 
Old 10-25-2008   #1 (permalink)
Gary''s Student


 
 

scripting msconfig

For debugging, I have a standard set of services and startup programs I want
to disable.

Is there any way to drive this with a script rather than manually clearing a
bunch of checkboxs each time??
--
Gary''s Student - gsnu200810

My System SpecsSystem Spec
Old 10-25-2008   #2 (permalink)
Pegasus \(MVP\)


 
 

Re: scripting msconfig


"Gary''s Student" <GarysStudent@xxxxxx> wrote in message
news:ACABF4AB-95D0-4D1B-8CA7-990A181E32B8@xxxxxx
Quote:

> For debugging, I have a standard set of services and startup programs I
> want
> to disable.
>
> Is there any way to drive this with a script rather than manually clearing
> a
> bunch of checkboxs each time??
> --
> Gary''s Student - gsnu200810
You can use sc.exe to enable/disable services.


My System SpecsSystem Spec
Old 10-25-2008   #3 (permalink)
Gary''s Student


 
 

Re: scripting msconfig

Thank you!
--
Gary''s Student - gsnu200810


"Pegasus (MVP)" wrote:
Quote:

>
> "Gary''s Student" <GarysStudent@xxxxxx> wrote in message
> news:ACABF4AB-95D0-4D1B-8CA7-990A181E32B8@xxxxxx
Quote:

> > For debugging, I have a standard set of services and startup programs I
> > want
> > to disable.
> >
> > Is there any way to drive this with a script rather than manually clearing
> > a
> > bunch of checkboxs each time??
> > --
> > Gary''s Student - gsnu200810
>
> You can use sc.exe to enable/disable services.
>
>
>
My System SpecsSystem Spec
Old 10-29-2008   #4 (permalink)
BigDaddyJim


 
 

Re: scripting msconfig

On Oct 25, 5:59*pm, Gary''s Student
<GarysStud...@xxxxxx> wrote:
Quote:

> Thank you!
> --
> Gary''s Student - gsnu200810
>
>
>
> "Pegasus (MVP)" wrote:
>
Quote:

> > "Gary''s Student" <GarysStud...@xxxxxx> wrote in message
> >news:ACABF4AB-95D0-4D1B-8CA7-990A181E32B8@xxxxxx
Quote:

> > > For debugging, I have a standard set of services and startup programsI
> > > want
> > > to disable.
>
Quote:
Quote:

> > > Is there any way to drive this with a script rather than manually clearing
> > > a
> > > bunch of checkboxs each time??
> > > --
> > > Gary''s Student - gsnu200810
>
Quote:

> > You can use sc.exe to enable/disable services.- Hide quoted text -
>
> - Show quoted text -

Here's what I have in our startup script...

' ***** SMS Client *****

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root
\CIMV2")
Set objShare = objWMIService.Get("Win32_Service.Name='CcmExec'")
Set objInParam =
objShare.Methods_("ChangeStartMode").inParameters.SpawnInstance_()
objInParam.Properties_.Item("StartMode") = "Automatic"
Set objOutParams =
objWMIService.ExecMethod("Win32_Service.Name='CcmExec'",
"ChangeStartMode", objInParam)
Set objOutParams =
objWMIService.ExecMethod("Win32_Service.Name='CcmExec'",
"StartService")

' ***** Trend Personal Firewall *****

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root
\CIMV2")
Set objShare = objWMIService.Get("Win32_Service.Name='TmPfw'")
Set objInParam = objShare.Methods_("ChangeStartMode"). _
inParameters.SpawnInstance_()
objInParam.Properties_.Item("StartMode") = "Automatic"
Set objOutParams =
objWMIService.ExecMethod("Win32_Service.Name='TmPfw'",
"ChangeStartMode", objInParam)
Set objOutParams =
objWMIService.ExecMethod("Win32_Service.Name='Tmpfw'", "StartService")

' ***** TMPROXY *****

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root
\CIMV2")
Set objShare = objWMIService.Get("Win32_Service.Name='tmproxy'")
Set objInParam =
objShare.Methods_("ChangeStartMode").inParameters.SpawnInstance_()
objInParam.Properties_.Item("StartMode") = "Automatic"
Set objOutParams =
objWMIService.ExecMethod("Win32_Service.Name='tmproxy'",
"ChangeStartMode", objInParam)
Set objOutParams =
objWMIService.ExecMethod("Win32_Service.Name='Tmproxy'",
"StartService")

' ***** Trend Real-Time Scan SERVICE *****

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root
\CIMV2")
Set objShare = objWMIService.Get("Win32_Service.Name='NTRTScan'")
Set objInParam =
objShare.Methods_("ChangeStartMode").inParameters.SpawnInstance_()
objInParam.Properties_.Item("StartMode") = "Automatic"
Set objOutParams =
objWMIService.ExecMethod("Win32_Service.Name='NTRTScan'",
"ChangeStartMode", objInParam)
Set objOutParams =
objWMIService.ExecMethod("Win32_Service.Name='NTRTScan'",
"StartService")



' ***** Trend Listener SERVICE *****

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root
\CIMV2")
Set objShare = objWMIService.Get("Win32_Service.Name='TMListen'")
Set objInParam =
objShare.Methods_("ChangeStartMode").inParameters.SpawnInstance_()
objInParam.Properties_.Item("StartMode") = "Automatic"
Set objOutParams =
objWMIService.ExecMethod("Win32_Service.Name='TMListen'",
"ChangeStartMode", objInParam)
Set objOutParams =
objWMIService.ExecMethod("Win32_Service.Name='TmListen'",
"StartService")

'***********************************************************

Set WshShell = WScript.CreateObject("WScript.Shell")
objProcess.Create "%comspec% /C sc failure tmproxy reset= 0 actions=
restart/0 _
& sc failure tmlisten reset= 0 actions= restart/0 & sc failure tmpfw
reset= 0 _
actions= restart/0 & sc failure ntrtscan reset= 0 actions= restart/0 &
sc failure ccmexec _
reset= 0 actions= restart/0 & sc failure KBOXManagementService reset=
0 actions= _
restart/0 & sc failure KBOXSMMPService reset= 0 actions= restart/0",
null, objConfig, intProcessID

It works perfect.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
msconfig Vista General
msconfig Vista General
Msconfig? General Discussion
MSCONFIG Vista General
Msconfig - where is it please? Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46