Link to home
Start Free TrialLog in
Avatar of hkacholia
hkacholia

asked on

how to call windows exe with parameter from asp.net application

how to call windows exe with parameter from asp.net application? Actually I have written code in button_load event. its running fine when i run from my computer and it passes parameters but when i published my web app on server and i tried from there , its not loading my exe. forget about parameter.
Please Send me reply asap.
Dim sInfo As New Diagnostics.ProcessStartInfo("//vsapps/cgs/ContractAutomation.exe") 'C:\\Documents and Settings\\hkacholi\\My Documents\\Visual Studio 2005\\Projects\\TestParamFromAsp\\TestParamFromAsp\\bin\\Debug\\TestParamFromAsp.exe")
 
        ' startInfo.WindowStyle = Diagnostics.ProcessWindowStyle.Maximized
        Dim p As New Diagnostics.Process
        'Diagnostics.Process.Start(sInfo)
 
        sInfo.Arguments = "12345" 'Contract number
 
        'Diagnostics.Process.Start(sInfo)
 
        sInfo.RedirectStandardOutput = True
        sInfo.RedirectStandardInput = True
        sInfo.RedirectStandardError = True
        sInfo.CreateNoWindow = True
        sInfo.UseShellExecute = False
 
        p.StartInfo = sInfo
        p.Start()

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of GuitarRich
GuitarRich
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hkacholia
hkacholia

ASKER

how to pass parameter with WSH.run(file)
i want to pass contract number from asp web application to windows vb exe so that it will come up with contract number n existing details.
It works thanks.
but i wanted to pass an argument also with opening exe so that i can pull up all the information about that id or number.
it works with system.diagnostics.process.arguments.
i wrote that in code behind , it works fine but when i write javascript it didnt pass parameter.