Solved

Remotely mapping a drive for a user

Posted on 2006-10-31
5
182 Views
Last Modified: 2013-11-21
Does anyone know a way to do the following using vbscript or similar?

  We often get requests to map drives or printers for users,
  I've written a VBscript that lets me connect someone to a printer without actually touching their PC (using rundll32 printui.dll),

  I want to do the same thing for drive mappings:
  I want to sit at PC#1 and run a script that connects PC#2 to a drive on Server #3

  I could do it by changing the login script, but I'm looking for a way to do one-off drive mappings without touching the user's PC,

Does anyone know of a way to do this?

Thanks
Keith
0
Comment
Question by:nfoods
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:KVR_Solutions
ID: 17843653
This is pretty simple:

If you are in a domain environment or have administrative rights, you can specify a batch file to run at logon or to be placed in the startup folder. You wouldn't need to touch everyones PC.


I typically call it something like, "startup.bat" and the contents would look something like this:

net use Z: /delete

net use Z: \\server\share /u:Administrator "passwordhere"

exit

(I've found that using the delete command first typically helps the phone to not ring as much.

Hope this helps,

Ira @ KVR
0
 
LVL 3

Assisted Solution

by:KVR_Solutions
KVR_Solutions earned 60 total points
ID: 17843662
BTW, i did read that you know about the logon script, but I think you may still be able to use that simple method but just do it from the domain admin level (assuming that you are on a domain)
0
 

Author Comment

by:nfoods
ID: 17849689
Yes we're on a domain,
I was hoping there was a way to force a drive mapping without having to log the user off/back on
but I've looked everywhere and don't think there is a way of doing it, other than write a quick batch file, drop it on the user's desktop and telling them to run it
0
 

Accepted Solution

by:
rudd_robert earned 65 total points
ID: 17892123
HI,

Running a command on a user's computer can be a tricky one to do without disrupting the user's session. The only way i know of doing it would be to use a tool like RemoteInvocation. Its an open source tool that is quite powerful. Check it out here...

http://www.codeguru.com/Cpp/I-N/network/remoteinvocation/article.php/c5433

Hope this helps
0
 

Author Comment

by:nfoods
ID: 17905470
Thanks for your helps on this - I've found a way of doing it,

write a batch file to map the drive (persistent)
drop it on the user's C drive
then run a remote CMD on their machine and run the batch file

not quite as clean as I was hoping - but it achieves what I wanted.

Thank you for your help
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
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…

776 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