SA Developer .NET

Welcome to SA Developer .NET Sign in | Join | Help
in Search

run an EXE file (with parameters) from ASP.NET 2.0 Page

Last post 09-04-2008, 16:56 by CalmYourself. 1 replies.
Sort Posts: Previous Next
  •  09-04-2008, 15:13 14565

    run an EXE file (with parameters) from ASP.NET 2.0 Page

     Hi guys I`m trying to run a remote EXE file via ASP.NET.

    When I run this on CMD of the local machine like  >  D:\CoatingProfileCreator\Creator.exe 4440,"a","b"    en its runs well but when I call it on the ASP page like on the code below it says it can not find the file specified

     here is my code ..........  

     

    Dim Programlocation As String = "\\serv-01\ProfileCreator\Creator.exe Param1," & "Param2" & "," & "Param3"

     

    Dim startInfo As System.Diagnostics.ProcessStartInfo

    startInfo = New System.Diagnostics.ProcessStartInfo(Programlocation)

    startInfo.UseShellExecute = False

    startInfo.RedirectStandardInput = True

    startInfo.RedirectStandardOutput = True

    Dim pStart As System.Diagnostics.Process = New Process()

    pStart.StartInfo = startInfo

    pStart.Start()

    pStart.WaitForExit()

    pStart.Close()

    pStart.Dispose()

     

    en after this I need to call a PDF which is being generated by the exe


    YOU MISS 100% CHANCES YOU DONT TAKE
  •  09-04-2008, 16:56 14573 in reply to 14565

    Re: run an EXE file (with parameters) from ASP.NET 2.0 Page

    Put the arguments in the Arguments property.

    Dim startInfo As New System.Diagnostics.ProcessStartInfo("\\Serv-01\ProfileCreator\Creator.exe")
    startInfo.Arguments = "Param1 & Param2 & Param3"


    Why go against tradition when we can admit defeat, live in decline, be the victim of our own design?
    http://dotnet.org.za/calmyourself
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems