?
Solved

Remotely mapping a drive for a user

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

800 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