Link to home
Start Free TrialLog in
Avatar of Here2Help
Here2HelpFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Run Program with Switches

Hey.

I'm trying to run my app with switches included but seems to error out. Any help?

Here's my code


'Run App

        Try
            Dim Drive As String = System.IO.Path.GetPathRoot(Application.StartupPath)
            Dim App As String = System.IO.Path.Combine(Drive, "\AppDir\App.exe /Switch1 /Switch2")
            Process.Start(App)
        Catch ex As Exception
            MsgBox("App Failed.", MsgBoxStyle.Exclamation)
        End Try

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America 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 Here2Help

ASKER

Works a treat.

cheers.