Solved

Login scripts and set commands

Posted on 2008-10-16
3
316 Views
Last Modified: 2008-10-17
(Windows 2003 and 2008 Windows active directory domain)

if i have a set statement in a login script
eg
set ABC = 123

and another set statement within the Grop Policy Preferences setting ABC to another value

who would win the conflict.?
Are Login script run before Group policy or is it the other way around ?
0
Comment
Question by:titn003
3 Comments
 
LVL 2

Expert Comment

by:munk33
ID: 22729600
Why not just test it?  Set both to different values in a sandboxed environment, and see which will take precedent.  I would expect it to be the logon script, but checking would surely be the best method?
0
 
LVL 15

Accepted Solution

by:
fishadr earned 500 total points
ID: 22730330
Group Policis will apply first, then the logon scripts set on the user accounts in Active Directory Users and Computers. Therfore you need to be careful how you apply settings to avoid the scenario that you mention.

Most companies implement scripts via group policy as it is easier to modify lots of users by controlling via GPO's
0
 
LVL 38

Expert Comment

by:Shift-3
ID: 22730594
The SET command sets a variable temporarily, not persistently.  It only lasts for the duration of the batch script and and any scripts called by that script.  Any scripts which are run independently will not have the variable set.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A safe way to clean winsxs folder from your windows server 2008 R2 editions
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question