Page 1 of 1 1
Topic Options
#172404 - 2007-01-04 09:38 PM Remapping drives based on current drive mappings
NHarris Offline
Lurker

Registered: 2005-06-02
Posts: 2
I have seen many scripts on deleting and mapping drive letters. What I'm trying to do is somehow search for a particlar share already mapped and change it to something else. Not everyone will have the same drive letter for this share (although most of them should). I'm trying to move files to another server and need to change the mapping on each users workstation only if they have it mapped.

thanks in advance

NH

Top
#172405 - 2007-01-04 10:06 PM Re: Remapping drives based on current drive mappings [Re: NHarris]
eriqjaffe Offline
Hey THIS is FUN

Registered: 2004-06-24
Posts: 214
Loc: Arlington Heights, IL USA
Check out fnMapped(), it'll let you determine if a share is mapped, and to what letter.

From there, you can use the built-in USE to unmap and remap the shares to the correct drive letters.


Edited by eriqjaffe (2007-01-04 10:08 PM)

Top
#172408 - 2007-01-04 10:16 PM Re: Remapping drives based on current drive mappings [Re: eriqjaffe]
NHarris Offline
Lurker

Registered: 2005-06-02
Posts: 2
Thank you

I"ll look at this.

Top
#172470 - 2007-01-06 08:20 PM Re: Remapping drives based on current drive mappings [Re: NHarris]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Why don't you use a UNC insead?
Code:
copy 'c:\local\folder\file.txt' '\\server\share\folder\'
_________________________
There are two types of vessels, submarines and targets.

Top
#172503 - 2007-01-08 03:02 AM Re: Remapping drives based on current drive mappings [Re: Sealeopard]
Willmaykett Offline
Fresh Scripter

Registered: 2007-01-07
Posts: 21
I would like to do something similar, but rather than read the drive letter associated with a share, I would like to read the share name assocuated with the drive letter.

Any thoughts?

Top
#172504 - 2007-01-08 03:51 AM Re: Remapping drives based on current drive mappings [Re: Willmaykett]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Pull it from the registry, HKCU\Network.
_________________________
There are two types of vessels, submarines and targets.

Top
#172514 - 2007-01-08 11:51 AM Re: Remapping drives based on current drive mappings [Re: Sealeopard]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
will, you have your own thread with answers already.
please keep your comments there, so it's easier to track later on.
_________________________
!

download KiXnet

Top
#172515 - 2007-01-08 12:50 PM Re: Remapping drives based on current drive mappings [Re: Lonkero]
Willmaykett Offline
Fresh Scripter

Registered: 2007-01-07
Posts: 21
No problem, sorry.

Feel free to edit/remove my post if that is the correct thing to do \:\)

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.07 seconds in which 0.038 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org