Solved

Login scripts

Posted on 2011-03-21
7
408 Views
Last Modified: 2012-06-21
I'm trying to add a simple login script for users and selected users:  For example:
net use p: \\servername\public /persistent:yes

I went to Group Policy Management-Default Domain Policy-Edit-User Configuration-Windows Settings-Scripts-Logon-Show Files and then pasted the logon.txt file that I created.

I then ran GPUPDATE /force

However, when I log into my computer the P drive is not mapped, or any other commands that I've specified in my logon.txt file.

Am I doing something wrong?
0
Comment
Question by:markrkelley123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 75 total points
ID: 35183862
login.txt?  It should be login.bat or login.cmd - assuming everything else has been done correctly.  (and I wouldn't say persistent:yes - if you make it persistent, why are you using a login script?).
0
 

Author Comment

by:markrkelley123
ID: 35183879
Ohh.  Good point.  I need to change it to LOGON.BAT.

I made it persistent so that way it comes back if someone disconnects the drive mapping.  Should I not?
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 35183905
The script runs EVERY TIME someone logs in... so it reconnects with every login.  (Actually if you have 2008 DCs, I believe you can map drives using Group Policy Preferences instead).
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 2

Expert Comment

by:ReesAssociates
ID: 35183914
After you change the name to .bat, run gpupdate.  Then lookup the results on your login test in the group policy editor.  This will let you know which settings were successfully implemented.
0
 

Author Comment

by:markrkelley123
ID: 35183980
Still doesn't work.  Are you refering to the Settings tab that generates reports or the GPRESULT command?
0
 
LVL 2

Expert Comment

by:ReesAssociates
ID: 35184073
Yes that is it.  Just wanted to make sure that it was recognizing your settings correctly and the correct GPO.

Have you tested the script by adding it to your test account in active directory?  
0
 
LVL 16

Assisted Solution

by:cantoris
cantoris earned 50 total points
ID: 35185170
As well as clicking show files and pasting it in, have you actually added it by name to the list of logon scripts in that group policy object?
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

726 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