How to Map Drive to NetLogon Share to Get Around Z Drive
Dropping the Connection Too Early
Keywords:
Here's some sample code from a user. It gets the current UNC for
the Z: drive, and uses that in the NetAddDrive. This prevents
the script from dropping the current connection by leaving
the Z: drive mapped as is, and provides a clever way to load
the WWW9534I.DLL from a mapped drive other than Z:.
AddExtender("WWNET34I.DLL")
w_directory = Environment("windir")
file = "\\stealth\norton\updater.exe"
drive = "U:"
done = 0
system = winmetrics(-4)
nt_logon_ser = Environment("LOGONSERVER")
nt_logon_ser = strcat(nt_logon_ser, "\netlogon")
if system == 5
log_ser = netGetCon("Z:")
ErrorMode(@off) ; See warnings
LastError()
rslt0 = NetAddDrive(@DEFAULT,@DEFAULT,"%log_ser%", drive, @false)
err=LastError()
ErrorMode(@cancel)
dirchange(drive)
AddExtender("%drive%\WWW9534I.DLL")
endif
Article ID: W13547
Filename: Map Drive to NetLogon Share Handles Z Drive.txt