Solved

Mapping a drive on Local Machine

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now