?
Solved

Network Drive's Access .bat file

Posted on 2010-01-11
11
Medium Priority
?
322 Views
Last Modified: 2012-05-08
I have windows 2008 server standard 64 bit and 20 client PC's running windows 7 32bit.
 Local server is a domain and running AD, DHCP, DNS, Terminal, and Exchange server.

when user log on to the server bat file run which has script and log the users to local drives such as H: J: K: L:

My question is can it be set that certain users have access to certain drives i.e. do you know the script or can individual script be written for each users
0
Comment
Question by:CJ
[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
  • 5
  • 5
11 Comments
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 1500 total points
ID: 26289076
There are environment variables you can use.

Open a command prompt up and type ...

SET

followed by the [ENTER] key.

You will see entries like ...

COMPUTERNAME
and
USERNAME


So, a batch file can use these like ...

@ECHO OFF
IF /I "%USERNAME%"=="RQuadling" (
 NET USE ....
 NET USE ...
 NET USE ...
)
IF /I "%USERNAME%"=="CJ_LONDON_2010" (
 NET USE ...
 NET USE ...
 NET USE ...
)

sort of thing.
0
 
LVL 1

Author Comment

by:CJ
ID: 26289125
ok many thanks i will give a go
regards
if nay more suggestion please do let me know
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 26289172
You could probably do all sorts of things using group policies (OMFOE).

If it is just the mapping, then putting this sort of script into the NETLOGON folder (and making it active etc. - don't know how, I just see it on out network), then this works.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:CJ
ID: 26289231
My thick brain didn't work or think about it
I already have an active bat file which runs the script for all users
What I will do is to create or modify the script for each user so that each user have an access to the drives they are assigned
Infact this will be better solution as it will not let the users see other drives which they not spouse to see
Many thanks for your help much aprecaited
If you want to know how to active these bat file I can post it here for future reference

Regards
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 26289263
Don't worry about that. I don't need to deal with it in my work. The batch file technique I describe I already use for other systems.

0
 
LVL 1

Author Comment

by:CJ
ID: 26289296
Thanks
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 26289353
I see you've got 10 open questions (http://www.experts-exchange.com/M_5174522.html). Make sure you close those that have been answered. That is how we get our points.

0
 
LVL 1

Author Comment

by:CJ
ID: 26289369
Ok I will do it the other 9 I am still waiting for postive responses. I will start off with your. Regards
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 26289389
0
 
LVL 1

Author Comment

by:CJ
ID: 26289396
Yes
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

770 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