Here is one way of turning the demo drive mapping function from the logonscript sample into working code...

code:
Function guerB()
$lblStatus.Text = "Mapeando os drives da rede..."

$sNetDrives = "H","I","J","L","M","S"
$sNetShares = "\\dell_server\user","\\dell_server\info","\\dell_server\cdrom","\\dell_server\informatica",
"\\dell_server\manualsiga","\\dell_server\ap6"

$frmFuncStatus.Text = "Mapeando os drives da rede..."
$prgFuncStatus.Max = Ubound($sNetDrives)+1
$prgFuncStatus.Value = ""
$frmFuncStatus.Show

For $I = 0 to Ubound($sNetDrives)
$prgFuncStatus.Value = $prgFuncStatus.Value + 1
$lblFuncStatus.Text = "Mapeando " + $sNetDrives[$I] + ":\"

shell "net use " + $sNetDrives[$I] + ": " + $sNetShares[$I] + " /yes"

Sleep 0.25
Next
$frmFuncStatus.Hide
Exit()
EndFunction



[ 01. October 2003, 20:06: Message edited by: Chris S. ]