How to run a script by a domain user ?

Discussion in 'Scripting' started by Sunny Chan, Dec 30, 2008.

  1. Sunny Chan

    Sunny Chan Guest

    Hi,

    My question is how to let the domain user run the logon script.

    ************************************************************************************
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colNetAdapters = objWMIService.ExecQuery _
    ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled =
    True")
    For Each objNetAdapter in colNetAdapters
    objNetAdapter.SetGateways array()
    next
    ************************************************************************************

    About this logon script, the users of Domain Admin can be run. But the users
    of Domain User can not.
     
    Sunny Chan, Dec 30, 2008
    #1
    1. Advertisements

  2. See the many replies you received in the scripting.vbscript newsgroup and
    have a look here about the merits of cross-posting vs. multi-posting:
    http://www.blakjak.demon.co.uk/mul_crss.htm. If you wish to extend the
    exposure of your original post then cross-posting is the recommended method
    to avoid duplication of effort.
     
    Pegasus \(MVP\), Dec 30, 2008
    #2
    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.