Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Remotely mapping a drive for a user

Posted on 2006-10-31
5
Medium Priority
?
200 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
[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
  • 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 180 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 195 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

610 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