Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling an executable from VB.NET and getting return val
Message
From
26/10/2006 08:51:38
 
 
To
25/10/2006 17:45:59
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01164564
Message ID:
01164677
Views:
7
Thanks, I'll see if I can get that to work for me.

>>Can you explain what I need to do with this? I've got very little VS/VB experience.
>
>This provides an example of using the Process class to accomplish this. You would have to adjust it a little bit to fit your own needs. I usually call this class like this:
>
>
>        Dim loProcess As Framework.Framework.ProcessFile = New Framework.Framework.ProcessFile(oApp)
>
>            loProcess.cWorkingDirectory = cWorkingDirectory
>            loProcess.cFileName = cFileName
>            loProcess.cArguments = """" + tcFile + """ """ + lcDirectory + """"
>            If loProcess.Process() = False Then
>                cStatus = oApp.cError
>                Return False
>            End If
>            lcLog = loProcess.cResponse
>
>
>You may adjust the New() event to avoid using the oApp.
>
>In this example, I am identifying the directory where the file to be executed resides. cFileName is the name of the file to be executed. If there are parameters, I am using cArguments. Then, I can call the Process() method. cResponse is the output.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform