Last post Apr 04, 2008 05:27 AM by albcan
Apr 04, 2008 05:27 AM|albcan|LINK
I am trying to run a vbs file from a web application deployed on Server14. The vbs file is on a shared network folder. From the Server14, I can access this folder and run the vbs with dos command line.
From the web application I get this error:
System.ComponentModel.Win32Exception: The system cannot find the file specified in System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) in System.Diagnostics.Process.
In the code, I use the same path used on command line. Looking on the internet, I have found that this error could be for insufficient privileges to access the folder. If so, what user should I add? I can't add the ASPNET user of the Server14 because is
a local user. Just for a test, I am going to ask the network office to add Everyone.
This is the code:
1 Dim startInfo
2 Dim pStart
As New System.Diagnostics.Process
3 Dim stringApp
4 Dim arg As String =
6 stringApp = "\\Server1\DATI\Procedure_PC_Host\send_mainframe.vbs"
8 startInfo = New System.Diagnostics.ProcessStartInfo(stringApp)
9 startInfo.Arguments = arg
12 pStart.StartInfo = startInfo
16 Catch exc
17 err = exc.ToString & "<BR><BR>" & stringApp &
"<BR>" & arg
18 End Try
Thanks for any help