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 - Need help with a logon script for the domain user

Reply
 
Old 12-20-2008   #1 (permalink)
Sunny Chan


 
 

Need help with a logon script for the domain user

Hello everybody,

I am a Administrator in the Domain.I can let the users of Domain Admin to
change its IP address through the Logon script. But,how about the Domain
Users ?
I want to let the domain user change its IP address through the logon
script. How can I do ? Can someone help me edit the script to do that ?



My System SpecsSystem Spec
Old 12-20-2008   #2 (permalink)
Al Dunbar


 
 

Re: Need help with a logon script for the domain user


"Sunny Chan" <cl_edp@xxxxxx> wrote in message
news:O%23KdKDpYJHA.1268@xxxxxx
Quote:

> Hello everybody,
>
> I am a Administrator in the Domain.I can let the users of Domain Admin to
> change its IP address through the Logon script. But,how about the Domain
> Users ?
> I want to let the domain user change its IP address through the logon
> script. How can I do ? Can someone help me edit the script to do that ?
Your normal users (i.e. not domain admins) generally lack the privileges
required to modify the configuration of the workstations. This is a good
thing, as it keeps them from making changes that interfere with its ability
to function properly. Imagine, for example, if they were to set the IP
address to something not in your subnet.

But why is it that you want them to change the IP address? And how will your
logon script ensure that it will never cause duplicate IP addresses?

Why not let DHCP provide the IP addresses your workstations require?

/Al


My System SpecsSystem Spec
Old 12-20-2008   #3 (permalink)
Joe Blow


 
 

Re: Need help with a logon script for the domain user

>
Quote:

> Why not let DHCP provide the IP addresses your workstations require?
>
> /Al
>
>
Al,

You took the words right out of my mouth!

Joe



My System SpecsSystem Spec
Old 12-25-2008   #4 (permalink)
sunny


 
 

Re: Need help with a logon script for the domain user

Because I want to bind down the IP addresses to different users.So when
logon from the different computer,they can change themself IP address
through the logon script.



"Joe Blow" <joe@xxxxxx> дÈëÏûÏ¢ÐÂÎÅ:uMhF2$rYJHA.412@xxxxxx
Quote:
Quote:

> >
>> Why not let DHCP provide the IP addresses your workstations require?
>>
>> /Al
>>
>>
> Al,
>
> You took the words right out of my mouth!
>
> Joe
>
>
>

My System SpecsSystem Spec
Old 12-25-2008   #5 (permalink)
Richard Mueller [MVP]


 
 

Re: Need help with a logon script for the domain user

IP addresses should be associated with computers, not users. In most cases,
users do not have permissions to change IP addresses, and they should not.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--

"sunny" <sunny@xxxxxx> wrote in message
news:%23BwDALvZJHA.5124@xxxxxx
Quote:

> Because I want to bind down the IP addresses to different users.So when
> logon from the different computer,they can change themself IP address
> through the logon script.
>
>
>
> "Joe Blow" <joe@xxxxxx>
> дÈëÏûÏ¢ÐÂÎÅ:uMhF2$rYJHA.412@xxxxxx
Quote:
Quote:

>> >
>>> Why not let DHCP provide the IP addresses your workstations require?
>>>
>>> /Al
>>>
>>>
>> Al,
>>
>> You took the words right out of my mouth!
>>
>> Joe
>>
>>
>>
>
>

My System SpecsSystem Spec
Old 12-25-2008   #6 (permalink)
sunny


 
 

Re: Need help with a logon script for the domain user

Look at this 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
************************************************************************************

How to let the Domain Users run this script before logon access by Logon
Script in Group Policy Object.



"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> дÈëÏûÏ¢ÐÂÎÅ:eKXVIZvZJHA.4520@xxxxxx
Quote:

> IP addresses should be associated with computers, not users. In most
> cases, users do not have permissions to change IP addresses, and they
> should not.
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab - http://www.rlmueller.net
> --
>
> "sunny" <sunny@xxxxxx> wrote in message
> news:%23BwDALvZJHA.5124@xxxxxx
Quote:

>> Because I want to bind down the IP addresses to different users.So when
>> logon from the different computer,they can change themself IP address
>> through the logon script.
>>
>>
>>
>> "Joe Blow" <joe@xxxxxx> дÈëÏûÏ¢ÐÂÎÅ:uMhF2$rYJHA.412@xxxxxx
Quote:

>>> >
>>>> Why not let DHCP provide the IP addresses your workstations require?
>>>>
>>>> /Al
>>>>
>>>>
>>> Al,
>>>
>>> You took the words right out of my mouth!
>>>
>>> Joe
>>>
>>>
>>>
>>
>>
>
>

My System SpecsSystem Spec
Old 12-28-2008   #7 (permalink)
Al Dunbar


 
 

Re: Need help with a logon script for the domain user


"sunny" <sunny@xxxxxx> wrote in message
news:%23BwDALvZJHA.5124@xxxxxx
Quote:

> Because I want to bind down the IP addresses to different users.
When I asked you "Why not let DHCP provide the IP addresses your
workstations require?" I was kind of hoping to get a reason somewhat more
rationale than "because I don't want to". I know you don't want to, I just
don't know why you don't want to, nor can I imagine a valid reason for this
posture.
Quote:

> So when logon from the different computer,they can change themself IP
> address through the logon script.
That way lies madness. Once a user logs on and the IP is set, what will its
IP address be on that workstation when the user logs off? If the same, then
if the use logs on at another workstation, the script will be attempting to
create a duplicate IP address. There is a component designed to prevent this
problem automatically, and it is called DHCP.

/Al
Quote:

>
>
>
> "Joe Blow" <joe@xxxxxx>
> дÈëÏûÏ¢ÐÂÎÅ:uMhF2$rYJHA.412@xxxxxx
Quote:
Quote:

>> >
>>> Why not let DHCP provide the IP addresses your workstations require?
>>>
>>> /Al
>>>
>>>
>> Al,
>>
>> You took the words right out of my mouth!
>>
>> Joe
>>
>>
>>
>
>

My System SpecsSystem Spec
Old 12-28-2008   #8 (permalink)
Al Dunbar


 
 

Re: Need help with a logon script for the domain user


"sunny" <sunny@xxxxxx> wrote in message
news:OzjpmRxZJHA.556@xxxxxx
Quote:

> Look at this 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
> ************************************************************************************
>
> How to let the Domain Users run this script before logon access by Logon
> Script in Group Policy Object.
Domain users cannot do anything before logging on, as they are not known as
domain users until they have been identified as such.

/Al
Quote:

>
>
>
> "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx>
> дÈëÏûÏ¢ÐÂÎÅ:eKXVIZvZJHA.4520@xxxxxx
Quote:

>> IP addresses should be associated with computers, not users. In most
>> cases, users do not have permissions to change IP addresses, and they
>> should not.
>>
>> --
>> Richard Mueller
>> MVP Directory Services
>> Hilltop Lab - http://www.rlmueller.net
>> --
>>
>> "sunny" <sunny@xxxxxx> wrote in message
>> news:%23BwDALvZJHA.5124@xxxxxx
Quote:

>>> Because I want to bind down the IP addresses to different users.So when
>>> logon from the different computer,they can change themself IP address
>>> through the logon script.
>>>
>>>
>>>
>>> "Joe Blow" <joe@xxxxxx>
>>> дÈëÏûÏ¢ÐÂÎÅ:uMhF2$rYJHA.412@xxxxxx
>>>> >
>>>>> Why not let DHCP provide the IP addresses your workstations require?
>>>>>
>>>>> /Al
>>>>>
>>>>>
>>>> Al,
>>>>
>>>> You took the words right out of my mouth!
>>>>
>>>> Joe
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>

My System SpecsSystem Spec
Old 12-29-2008   #9 (permalink)
Richard Mueller [MVP]


 
 

Re: Need help with a logon script for the domain user

As noted by Al, this requires the users to manage IP addresses across the
network (to prevent duplicates), which is impossible. Just guessing, but
perhaps your real aim is to track which users are logged on by pinging some
IP address assigned to them. If so, this cannot work. What is your real
purpose?

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--

"sunny" <sunny@xxxxxx> wrote in message
news:OzjpmRxZJHA.556@xxxxxx
Quote:

> Look at this 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
> ************************************************************************************
>
> How to let the Domain Users run this script before logon access by Logon
> Script in Group Policy Object.
>
>
>
> "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx>
> дÈëÏûÏ¢ÐÂÎÅ:eKXVIZvZJHA.4520@xxxxxx
Quote:

>> IP addresses should be associated with computers, not users. In most
>> cases, users do not have permissions to change IP addresses, and they
>> should not.
>>
>> --
>> Richard Mueller
>> MVP Directory Services
>> Hilltop Lab - http://www.rlmueller.net
>> --
>>
>> "sunny" <sunny@xxxxxx> wrote in message
>> news:%23BwDALvZJHA.5124@xxxxxx
Quote:

>>> Because I want to bind down the IP addresses to different users.So when
>>> logon from the different computer,they can change themself IP address
>>> through the logon script.
>>>
>>>
>>>
>>> "Joe Blow" <joe@xxxxxx>
>>> дÈëÏûÏ¢ÐÂÎÅ:uMhF2$rYJHA.412@xxxxxx
>>>> >
>>>>> Why not let DHCP provide the IP addresses your workstations require?
>>>>>
>>>>> /Al
>>>>>
>>>>>
>>>> Al,
>>>>
>>>> You took the words right out of my mouth!
>>>>
>>>> Joe
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>

My System SpecsSystem Spec
Old 12-30-2008   #10 (permalink)
Sunny Chan


 
 

Re: Need help with a logon script for the domain user

Please look at this 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
************************************************************************************
In this logon script , I just want to change the Gateways address !!!!! When
the Gateways address is null, the user can't connect to the Internet !!!

"Al Dunbar" <alandrub@xxxxxx> дÈëÏûÏ¢ÐÂÎÅ:uO32vxWaJHA.1336@xxxxxx
Quote:

>
> "sunny" <sunny@xxxxxx> wrote in message
> news:%23BwDALvZJHA.5124@xxxxxx
Quote:

>> Because I want to bind down the IP addresses to different users.
>
> When I asked you "Why not let DHCP provide the IP addresses your
> workstations require?" I was kind of hoping to get a reason somewhat more
> rationale than "because I don't want to". I know you don't want to, I just
> don't know why you don't want to, nor can I imagine a valid reason for
> this posture.
>
Quote:

>> So when logon from the different computer,they can change themself IP
>> address through the logon script.
>
> That way lies madness. Once a user logs on and the IP is set, what will
> its IP address be on that workstation when the user logs off? If the same,
> then if the use logs on at another workstation, the script will be
> attempting to create a duplicate IP address. There is a component designed
> to prevent this problem automatically, and it is called DHCP.
>
> /Al
>
Quote:

>>
>>
>>
>> "Joe Blow" <joe@xxxxxx> дÈëÏûÏ¢ÐÂÎÅ:uMhF2$rYJHA.412@xxxxxx
Quote:

>>> >
>>>> Why not let DHCP provide the IP addresses your workstations require?
>>>>
>>>> /Al
>>>>
>>>>
>>> Al,
>>>
>>> You took the words right out of my mouth!
>>>
>>> Joe
>>>
>>>
>>>
>>
>>
>
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Creating logon scripts - the script will map different sets of drivesdepending on the security grp the user is in. VB Script
Logon Script Causing Laptops To Hang - Problems in script? VB Script
Logon Failure: the user has not granted the requested logon type at this Vista networking & sharing
Logon failure: the user has not been granted the requested logon typeat this computer. .NET General
Failed to logon with domain user to Vista after copy local profile Vista account administration


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