Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Network Drive's Access .bat file

Posted on 2010-01-11
11
Medium Priority
?
327 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
  • 5
  • 5
10 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

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

Unable to change the program that handles the scan event from a network attached Canon/Brother printer/scanner. This means you'll always have to choose which program handles this action, e.g. ControlCenter4 (in the case of a Brother).
Among the most obnoxious of Exchange errors is error 1216 – Attached Database Mismatch error of the Jet Database Engine. When faced with this error, users may have to suffer from mailbox inaccessibility and in worst situations, permanent data loss.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

581 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