Mit folgendem Code komme ich nicht weiter:
Code: Alles auswählen
; CHANGE THESE PATHS TO SUIT!
remote$ = "\\GBG\@00 Arbeitshilfen\Dsdb\" ; Remote path
local$ = "Z:" ; Local drive to be 'created'
DefType.NETRESOURCE res
res\dwType = #RESOURCETYPE_DISK
res\lpLocalName = @local$
res\lpRemoteName = @remote$
res\lpProvider = #NULL
If WNetAddConnection2_ (res, #NULL, #NULL, 0) = #NO_ERROR
MessageRequester ("Cool!", "Connected -- check My Computer!", #MB_ICONINFORMATION)
WNetCancelConnection2_ (local$, #CONNECT_UPDATE_PROFILE, 0)
Else
MessageRequester ("Cool!", "Couldn't connect -- check paths and network!", #MB_ICONWARNING)
EndIfEs soll sich eigentlich beim Verbinden mit LW Z ein Dialog öffnen, wo ich Benutzername und Passwort eingeben kann.
Vielleicht hat ja auch jemand einen besseren Code für mich?
MfG
Reinhard
