poner en un archivo de inicio del perfil del usuario para montar automaticamente
en L //servidor2003/uno
en M //servidor2003/dos
(puse barra de la fecha en lugar de invertida por que taringa las barras invertidas las quita, subtituyanlas)
el archivo debe tener terminacion.vbs ejemplo pperez.vbs
Set oNetwork = CreateObject("WScript.Network" ; )
MapNetworkDrive "L:", "//servidor2003/uno"
MapNetworkDrive "M:", "//servidor2003/dos"
WScript.Quit
Sub MapNetworkDrive(sDrive,sShare)
sDrive=ucase(sDrive)
Set clDrives = oNetwork.EnumNetworkDrives
For i = 0 to clDrives.Count -1 step 2
if ucase(clDrives.Item(i))=sDrive then
oNetwork.removenetworkdrive sDrive,true,true 'force and update profile
exit for
end if
next
oNetwork.mapnetworkdrive sDrive,sShare,false 'don't update profile
end sub
Sub UnMapNetworkDrive(sDrive)
sDrive=ucase(sDrive)
Set clDrives = oNetwork.EnumNetworkDrives
For i = 0 to clDrives.Count -1 step 2
if ucase(clDrives.Item(i))=sDrive then
oNetwork.removenetworkdrive sDrive,true,true 'force and update profile
exit for
end if
next
end sub
en L //servidor2003/uno
en M //servidor2003/dos
(puse barra de la fecha en lugar de invertida por que taringa las barras invertidas las quita, subtituyanlas)
el archivo debe tener terminacion.vbs ejemplo pperez.vbs
Set oNetwork = CreateObject("WScript.Network" ; )
MapNetworkDrive "L:", "//servidor2003/uno"
MapNetworkDrive "M:", "//servidor2003/dos"
WScript.Quit
Sub MapNetworkDrive(sDrive,sShare)
sDrive=ucase(sDrive)
Set clDrives = oNetwork.EnumNetworkDrives
For i = 0 to clDrives.Count -1 step 2
if ucase(clDrives.Item(i))=sDrive then
oNetwork.removenetworkdrive sDrive,true,true 'force and update profile
exit for
end if
next
oNetwork.mapnetworkdrive sDrive,sShare,false 'don't update profile
end sub
Sub UnMapNetworkDrive(sDrive)
sDrive=ucase(sDrive)
Set clDrives = oNetwork.EnumNetworkDrives
For i = 0 to clDrives.Count -1 step 2
if ucase(clDrives.Item(i))=sDrive then
oNetwork.removenetworkdrive sDrive,true,true 'force and update profile
exit for
end if
next
end sub