YES! I got it! Had to use what I learned from everyone, add in some good ole brain food (caffeine), and get even more desperate. Turns out it wasn't all that difficult.
This is how to re-map drives with KiXtart 4.12 for Win95, WinNT, Win2K, and WinXP...it may be crude, but it works beautifully.
It includes the DriveEnum() function which was slightly modified to produce a specific output.
code:
;===============================================================================================
;**** Created with KiXscripts Editor | http://KiXscripts.com ****
;**** Last Modified on 4/18/2003 @ 5:01:10 PM by "thogarr" ****
;**** Developed for KiXtart release 4.12 | www.KiXtart.org ****
;===============================================================================================
;
; This code will Enumerate Mapped Drives, See If any specific
; mappings exist, and if so, Set the drive letter as a variable, and use the Variable
; to delete the existing mapping and map the drive to the specified UNC.
; You will need to modify the UNC to search for and the UNC to map. This worked for me
; because we had 3 shares on one server that started with the same 2 letters which I
; needed to consolidate into one new share on a different sever and get everyone remapped.
;
For Each $drive in Split(DriveEnum(3))
If InStr($drive,"\\server1\share")
$driveltr=Left($drive,2)
Use $driveltr /Del /PERSISTENT
Use $driveltr "\\server2\share" /PERSISTENT
EndIf
Next
;
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
; FUNCTIONS
;************************************************************
;**
;** Enumerate Drives Function
;**
;**
;Function DriveEnum()
;
;Author Radimus
;
;Version 1 (06.20.2002)
;
;Action Returns a list of all connected drive letters (space seperated).
;
;Syntax DriveEnum(optional $filter)
;
;Parameters
; $filter- (to return specific types of drives. any combination of the numbers below)
; 0/"" - return all drives
; 1 - return removable drives
; 2 - return fixed drives
; 3 - return network drives
; 4 - return CD rom drives
; 5 - return RAM drives
;
;
;Remarks
;
;
;Returns
; -space seperated list of drive letters use split() to seperate
;
;
;Dependencies
; WSH - kix 4.02+
;
;Examples
; $netdrives=DriveEnum(3)
; $localdrives=DriveEnum(124)
; $all=DriveEnum("")
;
;Source
;******************************************************************
Function DriveEnum(optional $filter)
Dim $fso, $Drive
$fso=CreateObject("Scripting.FileSystemObject")
If $fso
For Each $Drive in $fso.Drives
If InStr($filter,$Drive.DriveType) OR $filter=""
$DriveEnum=$DriveEnum+$Drive.DriveLetter + ":" + $Drive.Sharename + ", "
EndIf
Next
$DriveEnum=Left($DriveEnum,Len($DriveEnum)-1)
$fso=""
EndIf
EndFunction
[ 19. April 2003, 00:03: Message edited by: MaestroG ]