Solved

Login Bat file help needed

Posted on 2013-01-22
4
287 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Synchronize a new Active Directory domain with an existing Office 365 tenant
This article runs through the process of deploying a single EXE application selectively to a group of user.
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 install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

832 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