Ver Mensaje Individual
  #5 (permalink)  
Antiguo 05/09/2008, 04:22
Avatar de elangelcaido
elangelcaido
 
Fecha de Ingreso: septiembre-2003
Ubicación: Oviedo
Mensajes: 1.068
Antigüedad: 20 años, 9 meses
Puntos: 4
Respuesta: Mapear unidad de red

Otro que encontre con VBScript
Código:
<html>
<head>
</head>
<body>
Click para mapear: 
<script LANGUAGE="vbscript">
Sub DriveMap()
Set WshNetwork = CreateObject("WScript.Network")

dim matriz (25)
for i=0 to 25
   matriz(i)=Chr(i+65)
next

Dim fso, msg
Dim encontrado
encontrado = False
Set fso = CreateObject("Scripting.FileSystemObject")
for i=0 to 25
	If fso.DriveExists(matriz(i)) Then
      msg = "1" 'existe
   Else
		msg = matriz(i) & ":"
		'msgBox "Letra elegida: " & msg
		WshNetwork.MapNetworkDrive msg, "\\servidor\\carperta"
		Exit For
   End If
next
document.writeln("Mapeado en la unidad " & msg)

Set WshNetwork = nothing

End Sub
</script>
<input type="button" onclick="DriveMap()" value="Click">
</body>
</html>
__________________
Ta Luego! Al final sólo puede quedar uno...
________
lukos.org