Solved

Remotely mapping a drive for a user

Posted on 2006-10-31
5
180 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Let’s list some of the technologies that enable smooth teleworking. 
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
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…
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…

763 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

11 Experts available now in Live!

Get 1:1 Help Now