Solved

Mapping a drive on Local Machine

Posted on 2004-08-10
5
319 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

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…
By reading this blog, MSPs will gain insight into how to improve communications with their clients as well as establish a more profitable business.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

710 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