WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Microsoft Client
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2001:03:01:13:51:20
Last Updated: 2001:03:01:13:51:20