I'm playing around with VB.NET once again since college and I'm trying to recreate a program that GeekSquad uses called the MRI for a friend.

Upon doing so, I have run into a few snags. The must present one is once I publish my application to a particular spot that also includes already setup folders with portable apps setup in them. I want to use

Process.Start("App Path")

where App Path is the drive letter of where the Custom Program exe is located and calling file Test1.exe in the test1 folder in the root.

Hopefully someone can help me. Thanks in advance.

You can find you application path with filename by this code

Application.StartupPath

It will return the fullpath

You can access another folder or parent folder

Imports System.IO
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim di As New DirectoryInfo(Path.GetDirectoryName(Application.StartupPath))
        'Get The Directory of the application
        Dim parentdi As DirectoryInfo
        parentdi = di.Parent
        'get the parent 
        Dim childdi As New DirectoryInfo(parentdi.FullName & "\test1")
        'get the test1 folder
        Shell(childdi.FullName & "\test1.exe")
        'run the application
    End Sub
End Class

i'm not sure about you drive letter, you can get the root for your application

Imports System.IO
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim di As New DirectoryInfo(Path.GetDirectoryName(Application.StartupPath))
        'Get The Directory of the application
        Dim rootdi As DirectoryInfo
        rootdi = di.Root
        Shell(rootdi.FullName & "test1\test1.exe")
    End Sub
End Class

Okay. I have my program running now correctly. I'm using the follow code:

Process.Start(Application.StartupPath & "\Programs\Test\Test1\Test.exe")

I need to append a /quiet to my .exe. How would I do this? I tried to just append it after the .exe but it did not work.

This question has already been answered. Start a new discussion instead.