I wish to disconect nettwork's path after the job is finiched.
I have make 2 scripts that work fine but i wish merge it.
The first is:
Dim WshNetwork
Dim objShell
Set WshNetwork.CreateObject ("WScript.Network")
WshNetwork.MapNetworkDrive "O:", "\\Servername\Shere",,"username", "Password"
Set objShell = CreateObject ("WScript.shell")
objShell.Run "%comspec% /c C: cd logs & dir dir >O:\text.txt
WScript.
The Second is:
Dim WshNetwork
Set WshNetwork.CreateObject ("WScript.Network")
WshNetwork.RemoveNetworkDrive "O:"
Is it posible to do it ?
Thanks for any help
Erik
I have make 2 scripts that work fine but i wish merge it.
The first is:
Dim WshNetwork
Dim objShell
Set WshNetwork.CreateObject ("WScript.Network")
WshNetwork.MapNetworkDrive "O:", "\\Servername\Shere",,"username", "Password"
Set objShell = CreateObject ("WScript.shell")
objShell.Run "%comspec% /c C: cd logs & dir dir >O:\text.txt
WScript.
The Second is:
Dim WshNetwork
Set WshNetwork.CreateObject ("WScript.Network")
WshNetwork.RemoveNetworkDrive "O:"
Is it posible to do it ?
Thanks for any help
Erik