Solved

Login Bat file help needed

Posted on 2013-01-22
4
283 Views
Last Modified: 2013-05-09
I need a simple login bat file that can be run on users profiles on our W2K8R2 enviorment. I need to be able to map the S drive which is our Sales share to all users and as a user home directory for each user. Once the drives map they want Hello %username today is %date Have a great day! to be displayed.

I have never written a login script so I am looking for some help. I dont want to do any powershell stuff just a simple bat file that I can pop in the sysvol folder under scripts.
0
Comment
Question by:MXadmin
  • 2
4 Comments
 
LVL 10

Expert Comment

by:ddiazp
Comment Utility
what's the UNC path to the share?

Just save this as share.bat on your sysvol and point to that file on the logon script on AD for the accounts you want to use this on.

You can either mount the drive through that script, or via the 'Home Drive' fields on the AD user account properties. It would be redundant to do both and will give you an error if you do both:

@ECHO OFF

net use S: \\shareserver\Sales

echo "Hello %USERNAME%, today is %DATE%. Have a great day!"

Open in new window

0
 
LVL 57

Expert Comment

by:Mike Kline
Comment Utility
also think about using group policy preferences for mapping the drive

 thanks

 mike
0
 

Accepted Solution

by:
MXadmin earned 0 total points
Comment Utility
That does not work. I already had that type of script done it maps drives but does not display the message.
0
 

Author Closing Comment

by:MXadmin
Comment Utility
works
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

762 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

10 Experts available now in Live!

Get 1:1 Help Now