Solved

Mapping a drive on Local Machine

Posted on 2004-08-10
5
320 Views
Last Modified: 2012-05-05
Is there a way to map a drive on a local machine without using group policies. Ex. I have a computer that 9 users login to and I need to map a drive (R) for all the users so instead of having to login as all the users and map the drive I want to use a share username such as testuser with a password of test and for it to automaticly save the password upon login on the local machine.
0
Comment
Question by:deshi777
[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
  • 3
5 Comments
 
LVL 2

Accepted Solution

by:
Ranidae earned 250 total points
ID: 11767792
Am I getting this right?

You want the 9 users who login to that machine to all get the "R" drive, but mapping the "R" drive requires different credentials for authentication?

Create a logon script and assign it to these users.  A vbscript could execute the mapping command only if the computername equals the computername where the "R" drive is required.

Something like what follows:

Dim WSHNetwork
Dim objComputerName
Set WSHNetwork = WScript.CreateObject("WScript.Network")
objComputerName = (wshNetwork.ComputerName)
'XXXXX represents the name of the computer where the R drive is needed
      if objComputerName = "XXXXX" then
           WSHNetwork.MapNetworkDrive "R:", "SERVER\SHARE", , "USERNAME", "PASSWORD"
End If

If I misunderstood the scenario... please clarify ... thanks
0
 
LVL 14

Assisted Solution

by:dlwyatt82
dlwyatt82 earned 250 total points
ID: 11767940
Rather than configure a login script for the users' domain accounts, you write the same script, and add an entry to the [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run] key to launch it. That way, when any user logs onto the computer and Windows Explorer starts, the script will be executed and your drive will be mapped (on that PC only, without affecting user accounts in the domain).
0
 
LVL 2

Expert Comment

by:Ranidae
ID: 11767967
Good call dlwyatt82 !!!
0
 
LVL 2

Expert Comment

by:Ranidae
ID: 11767975
Just a thought though...

if you do it that way... ALL users get the drive, not just the specific 9.... if that's still ok... then all you need in the script is:

Dim WSHNetwork
Set WSHNetwork = WScript.CreateObject("WScript.Network")
WSHNetwork.MapNetworkDrive "R:", "SERVER\SHARE", , "USERNAME", "PASSWORD"
0
 
LVL 1

Author Comment

by:deshi777
ID: 11771758
Ok thanks I'll try that
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
First of all let me say that the only language that I speak is English, but in answering questions here I often come across people whose English skills are not the best and I’d like to be able to communicate better with them, and the following descr…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

617 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