script terminates before here

Discussion in 'Scripting' started by joey, Oct 31, 2008.

  1. joey

    joey Guest

    Set objUser = GetObject _
    ("LDAP://localhost:51008/xxxxxxxxxxxxxxxxxxxxxxxxxx")
    objUser.Put "KeyValueString", "true"
    objUser.SetInfo


    '===================================================================================================================

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colServices = objWMIService.ExecQuery _
    ("Select * from Win32_Service Where Name = 'Service")
    For each objService in colServices
    objService.StopService()
    Next


    I want to restart a service after I input this keyvalue in ADAM in the same
    script. But its terminates before it reaches strComputer"."

    any idea?
     
    joey, Oct 31, 2008
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.