Solved

Login Bat file help needed

Posted on 2013-01-22
4
286 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
ID: 38808337
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
ID: 38808350
also think about using group policy preferences for mapping the drive

 thanks

 mike
0
 

Accepted Solution

by:
MXadmin earned 0 total points
ID: 38808359
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
ID: 39150963
works
0

Featured Post

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Question has a verified solution.

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

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
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…

920 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

15 Experts available now in Live!

Get 1:1 Help Now