Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > How to run a script by a domain user ?

Reply
Thread Tools Display Modes

How to run a script by a domain user ?

 
 
Sunny Chan
Guest
Posts: n/a

 
      12-30-2008
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.


 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a

 
      12-30-2008

"Sunny Chan" <> wrote in message
news:...
> 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.


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.


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to script user properties on a non-domain W2K3 server OmoBendel Scripting 2 07-13-2007 05:08 PM
REPOST to try to get some kind of answer - Script that will list all the groups in Domain A that a user on Domain B is a member of Mike Matheny Scripting 1 03-21-2007 03:25 PM
Script that will list all the groups in Domain A that a user on Domain B is a member of Mike Matheny Scripting 0 01-12-2007 08:57 PM
script add domain user to local group alexander Scripting 1 02-17-2004 10:09 PM
changing domain user through vb script/ ASP nahsan@duet.ac.bd Scripting 0 01-27-2004 02:40 PM



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 47 48 49 50 51 52 53 54 55 56 57 58 59