Solved

Login scripts

Posted on 2011-03-21
7
404 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
  • 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now