?
Solved

Windows Logon Batch File

Posted on 2011-02-22
8
Medium Priority
?
474 Views
Last Modified: 2012-05-11
i have just switched from a windows 2000 to windows 2008sb server.

on a couple of laptops i had a log on script batch file which ran on start up - it prompted the user for username/password on the 2000 server.............it reads as follows:

@echo off
net time \\server10 /set /yes
net use J: \\server10\Usershares2`      
net use I: \\server10\Setup
net use x: \\server10\hotel
net use w: \\server10\Artwork

When i try to point the same script (changing the server10 name) at the new server the script does not work.

does the script need to be modified for windows 2008 server?
0
Comment
Question by:VSFLYER
[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
  • 4
  • 3
8 Comments
 
LVL 37

Expert Comment

by:Neil Russell
ID: 34951653
Have you created all those shares on the new server and given access rights to all the users that need them?

Your Net Time command is not needed, time will be taken from your domain.
0
 
LVL 85

Expert Comment

by:oBdA
ID: 34951669
First, forget about "net time"; it's deprecated, users don't have permissions to change the time, and all Windows OSs since W2k have a time service that automatically syncs the time in a domain.
Then you might have to delete the old mappings, depending on whether the existing mappings are persistent or not.

@echo off
net use J: /delete >NUL 2>&1
net use J: \\server10\Usershares2`      
net use I: /delete >NUL 2>&1
net use I: \\server10\Setup
net use X: /delete >NUL 2>&1
net use x: \\server10\hotel
net use W: /delete >NUL 2>&1
net use w: \\server10\Artwork

Open in new window

0
 

Author Comment

by:VSFLYER
ID: 34951680
shares are all set up on the new server

the batch file should ask the user to enter username and password and allow access based on those entries.

linked to the new server, the batch file is no longer requesting a username/password and simply connecting the users to the drives which everyone has access to.
0
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 
LVL 85

Accepted Solution

by:
oBdA earned 2000 total points
ID: 34951743
Any specific reason why user name and password need to be specified explicitly?
Here's a rough draft:
@echo off
setlocal
set Server=Server10
set /p UserID=Please enter the user name to access %Server%: 
for %%a in (I J W X) do (
  net use %%a: /delete >NUL 2>&1
)
net use J: "\\%Server%\Usershares2" * /user:"%UserID%"
net use I: \\%Server%\Setup
net use X: \\%Server%\hotel
net use W: \\%Server%\Artwork

Open in new window

0
 

Author Comment

by:VSFLYER
ID: 34951817
the name and password need to be specified explicitly as that is what identifys what folders to allow access to.
0
 
LVL 85

Expert Comment

by:oBdA
ID: 34951862
Are the users logging on to local accounts on the laptops instead of domain accounts?
0
 

Author Comment

by:VSFLYER
ID: 34951927
set up is as follows we had a server SERVER02 - some laptop users used the log-on batch file orginally noted above - this prompted them for a username and password, once the username and apssword were entered the script closed and the users we able to access their directories on the server.

i have now got a new server SERVER10 - i attempted to use the same log-on batch file however the script does not prompt for the username, just connects to the drives and allows only access to those folders marked on the server for everybody acccess.
0
 
LVL 85

Expert Comment

by:oBdA
ID: 34951954
Try the script in http:#a34951743 then. If it works, the error handling can be enhanced.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
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…
Suggested Courses

765 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