
Originally Posted by
MaceZ4
Ok maybe someone can pick up from this and figure out how to tie it in with AD...
I use bat files to map drive for people that don't have/want domain attached machines.
Code:
net use X: \\server\folder\ /user:domain\userid password
Change where it says "server" to the name of the server, "folder" to the location and you can keep digging as deep as needed so as to tie into people's storage drives.
Then replace "userid" with the login name and "password" with their password.
Yes it's simple and boring to make loads of these, but it has served well for me

Yeah I have that part as have been given a autoit script from somebody at another school but not all my users are on the same file server which is where I need the AD query for the homepath.
So far i have
Code:
Local $Username, $Password, $Result, $Flag
$Flag = 0
RunWait("cmd /c net use w: /DELETE")
RunWait("cmd /c net use p: /DELETE")
Do
if $Flag = 1 Then
MsgBox(0,"Error","Your username or password were incorrect. Please try again")
EndIf
$Flag = 1
$Username = InputBox("Logon to Network Drives", "Please enter your username:","","",150,80)
if $Username = "" then
Exit
endif
$Password = InputBox ("Logon to Network Drives", "Please enter your password:","","!",150,80)
if $Password = "" then
Exit
endif
$Result = RunWait("cmd /c net use N: \\server\share " & $Password & " /USER:" & $Username & " /PERSISTENT:NO")
$Result = RunWait("cmd /c net use R: \\server\sharedarea " & $Password & " /USER:" & $Username & " /PERSISTENT:NO")
Until $Result = 0 AND NOT @error
Exit I just need to find something i can use for a query to ad to output to say $homedrive
then add the variable to the $result instead of \\server\share
Toby