Windows Vista Forums

scripting msconfig
  1. #1


    Gary''s Student Guest

    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

  2. #2


    Pegasus \(MVP\) Guest

    Re: scripting msconfig


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

    > 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

  3. #3


    Gary''s Student Guest

    Re: scripting msconfig

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


    "Pegasus (MVP)" wrote:

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

    > > 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

  4. #4


    BigDaddyJim Guest

    Re: scripting msconfig

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

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

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

    > > > For debugging, I have a standard set of services and startup programsI
    > > > 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.- 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

scripting msconfig problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
msconfig Bill Vista General 5 23 May 2009
msconfig Bob Shattler Vista General 11 23 Dec 2008
Msconfig? joe1967 General Discussion 5 22 Nov 2008
MSCONFIG retiredx Vista General 3 09 May 2008
Msconfig - where is it please? Hank Keleher Vista General 11 10 Sep 2006