Hi,
The below script works fine, but it is displaying a prompt before running snetcfg.exe. How can this be suppressed? Thanks.
Set WshShell=CreateObject("WScript.Shell")
Set Filesys=CreateObject("Scripting.FileSystemObject")
Set objNetwork=CreateObject("Wscript.Network")
sWinDir = Filesys.GetSpecialFolder(0)
objNetwork.MapNetworkDrive "b:", "\\server\software"
wshshell.CurrentDirectory="b:\misc\"
Filesys.copyfile "b:\misc\snetcfg.exe", "c:\"
sSnetcfgPath = "c:\snetcfg.exe"
sUninstCmd = Chr(34) & sSnetcfgPath & Chr(34) & " -u MS_Server"
WshShell.Run sUninstCmd, 0, True
sInstCmd = Chr(34) & sSnetcfgPath & Chr(34) & " -l " & sWinDir & "\Inf\NETSERV.INF -c s -i MS_Server"
iRC = oShell.Run(sInstCmd, 0, True)
wshshell.CurrentDirectory="c:\"
objNetwork.RemoveNetworkDrive "b:"
The below script works fine, but it is displaying a prompt before running snetcfg.exe. How can this be suppressed? Thanks.
Set WshShell=CreateObject("WScript.Shell")
Set Filesys=CreateObject("Scripting.FileSystemObject")
Set objNetwork=CreateObject("Wscript.Network")
sWinDir = Filesys.GetSpecialFolder(0)
objNetwork.MapNetworkDrive "b:", "\\server\software"
wshshell.CurrentDirectory="b:\misc\"
Filesys.copyfile "b:\misc\snetcfg.exe", "c:\"
sSnetcfgPath = "c:\snetcfg.exe"
sUninstCmd = Chr(34) & sSnetcfgPath & Chr(34) & " -u MS_Server"
WshShell.Run sUninstCmd, 0, True
sInstCmd = Chr(34) & sSnetcfgPath & Chr(34) & " -l " & sWinDir & "\Inf\NETSERV.INF -c s -i MS_Server"
iRC = oShell.Run(sInstCmd, 0, True)
wshshell.CurrentDirectory="c:\"
objNetwork.RemoveNetworkDrive "b:"