Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling an executable from VB.NET and getting return val
Message
From
25/10/2006 17:45:59
 
 
To
25/10/2006 17:09:12
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01164564
Message ID:
01164590
Views:
12
>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.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform