Solved

Mapping a drive on Local Machine

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

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…
This article describes how to reset your Windows 10 password when you've forgotten it.
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 …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

830 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