Hi all,
I need to map a network drive and then lanch i program using a specific working directory.
This is my current syntax:
--------------------------------------------------
on error resume next
Dim strArgs
Set objArgs = WScript.Arguments
strArgs = objArgs(0)
Set Shell = WScript.CreateObject("WScript.Shell")
Shell.Run ("%comspec% /C net use q: /D"), 0, True
Set Shell = WScript.CreateObject("WScript.Shell")
Shell.Run ("%comspec% /C net use q: \\server\path"), 0, True
Set Shell = WScript.CreateObject("WScript.Shell")
Shell.Run (strArgs ), 0, True
-------------------------------------------------------
The code works fine, but the application is failing due to wrong workdir.
Please help.
// Wibbe
I need to map a network drive and then lanch i program using a specific working directory.
This is my current syntax:
--------------------------------------------------
on error resume next
Dim strArgs
Set objArgs = WScript.Arguments
strArgs = objArgs(0)
Set Shell = WScript.CreateObject("WScript.Shell")
Shell.Run ("%comspec% /C net use q: /D"), 0, True
Set Shell = WScript.CreateObject("WScript.Shell")
Shell.Run ("%comspec% /C net use q: \\server\path"), 0, True
Set Shell = WScript.CreateObject("WScript.Shell")
Shell.Run (strArgs ), 0, True
-------------------------------------------------------
The code works fine, but the application is failing due to wrong workdir.
Please help.
// Wibbe