It wasn't attached. It's in the text at the bottom. Should do exactly what you want. (it's doing it for us)
René From: Steve Kelsay [mailto:[email protected]] Sent: Friday, March 20, 2009 7:13 PM To: NT System Admin Issues Subject: RE: Scrip Help please? Thanks. If you sent an attachment and did not rename it, it will not get to me, since the email filters strip out all executable suffixes. Could I impose on you to rename it .vvv or something? From: Rÿÿé de Haas [mailto:[email protected]] Sent: Friday, March 20, 2009 14:10 PM To: NT System Admin Issues Subject: RE: Scrip Help please? Sent a subroutine for a script to you directly since my scripts end up garbled here. Michaels script does more or less what you want though the end result is the same even if sometimes the remapping may not be necessary. René From: Steve Kelsay [mailto:[email protected]] Sent: Friday, March 20, 2009 7:02 PM To: NT System Admin Issues Subject: RE: Scrip Help please? I can map a drive, and unmap it. What I need to know is how I can retrieve the share to which the existing drive is mapped, so for example, if I want the w: drive to map to \\vmdorscnimg\vdeplus <file:///\\vmdorscnimg\vdeplus> , I can check to see if the W: drive is already mapped, and if it is not mapped to the desired W: mapping, then execute the remapping of it. So far, I can do everything except see where the existing drive is mapped TO so that I can them do a comparison. From: Michael B. Smith [mailto:[email protected]] Sent: Friday, March 20, 2009 12:38 PM To: NT System Admin Issues Subject: RE: Scrip Help please? In fact, call me lazy, but I just short-cut this process, this way: Net use x: /del 2>nul >nul Net use x: \\server\share From: Carl Houseman [mailto:[email protected]] Sent: Friday, March 20, 2009 12:33 PM To: NT System Admin Issues Subject: RE: Scrip Help please? What is done with the mapping that is retrieved? Output to the screen, something else? What you've specified so far doesn't need VBS, can be done in fewer lines of simple .cmd/.bat scripting. if exist x:\ ( net use x:|find /I "remote name" ) else ( net use x: \\server\share ) Doesn't get much simpler. Carl From: Steve Kelsay [mailto:[email protected]] Sent: Friday, March 20, 2009 12:19 PM To: NT System Admin Issues Subject: Scrip Help please? I am looking for help writing a VBScript to 1. Detect whether a specified mapped drive exists 2. If so, retrieve the target mapping (if the X: drive is not mapped to \\server\share <file:///\\server\share> , then map it ) I have Googled and found lots of stuff, but nothing that does this. I can retrieve the drive letter and see if it exists, but where it is mapped to is eluding me. It has to be simple. ________________________________ *** The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail delete this e-mail and refrain from any disclosure or action based on the information. *** *** The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail delete this e-mail and refrain from any disclosure or action based on the information. *** ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
