obiwantuxedo
MIS
Having a bit of a problem. We have written a custom application that is to launch at logon in an NT4 domain with NT4 wkst and W2k Pro clients. We have put the application and its related files in a folder and have the logon.bat file point to the .VBS script as follows:
@echo off
cscript infocon.vbs
INFOCON.VBS is as below:
Option Explicit
Dim objFSO, objWS
Dim WshShell, WshNetwork
Dim letter, strTest, Return
Set objFSO = CreateObject("Scripting.FileSystemObject"
Set WshNetwork = WScript.CreateObject("WScript.Network"
Set WshShell = WScript.CreateObject("WScript.Shell"
'Map network drive to run INFOCON.EXE
driveAvailable
objWS.Echo "Available drive found..."
WshNetwork.MapNetworkDrive +Chr(letter)+":", "\\ourdhcp01\d$\temp"
' Execute INFOCON.EXE
Return = WshShell.Run(Chr(letter) &":\infocon.exe", 1, True)
' Disconnect mapped drive
driveDisconnect
'***********************************************************
' Map drive to hotfixes using next available drive letter
Sub driveAvailable
letter=Asc("h"
While objFSO.DriveExists(Chr(letter)+":"
letter=letter+1
Wend
End Sub
' Disconnect drive mapped by driveAvailable
Sub driveDisconnect
WShNetwork.RemoveNetworkDrive +Chr(letter)+":"
End Sub
Whenever this runs, the drive is mapped, the script starts, then returns run-time error 75 path can not be found. Any suggestions? Also, is there a way to keep the command prompt window from displaying? We do not want users to be able to stop the script before it has completed.
Thanks,
David Moore
@echo off
cscript infocon.vbs
INFOCON.VBS is as below:
Option Explicit
Dim objFSO, objWS
Dim WshShell, WshNetwork
Dim letter, strTest, Return
Set objFSO = CreateObject("Scripting.FileSystemObject"
Set WshNetwork = WScript.CreateObject("WScript.Network"
Set WshShell = WScript.CreateObject("WScript.Shell"
'Map network drive to run INFOCON.EXE
driveAvailable
objWS.Echo "Available drive found..."
WshNetwork.MapNetworkDrive +Chr(letter)+":", "\\ourdhcp01\d$\temp"
' Execute INFOCON.EXE
Return = WshShell.Run(Chr(letter) &":\infocon.exe", 1, True)
' Disconnect mapped drive
driveDisconnect
'***********************************************************
' Map drive to hotfixes using next available drive letter
Sub driveAvailable
letter=Asc("h"
While objFSO.DriveExists(Chr(letter)+":"
letter=letter+1
Wend
End Sub
' Disconnect drive mapped by driveAvailable
Sub driveDisconnect
WShNetwork.RemoveNetworkDrive +Chr(letter)+":"
End Sub
Whenever this runs, the drive is mapped, the script starts, then returns run-time error 75 path can not be found. Any suggestions? Also, is there a way to keep the command prompt window from displaying? We do not want users to be able to stop the script before it has completed.
Thanks,
David Moore