Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Application path

  1. #1

    Thread Starter
    Member Sheepy_Daz's Avatar
    Join Date
    Mar 2006
    Posts
    39

    Resolved [RESOLVED] [2005] Application path

    Hey
    I'm making a program an ran into a bit of a problem with the local drive letters.

    My HDD is call Drive C, a few people I know have differant letters.

    Code:
    System.Diagnostics.Process.Start("C:\Program Files\Trend Micro\HijackThis\HijackThis.exe")
    I'm trying to change C so that it runs on any drive letter.

    How would I go about doing this?

    Thanks in advanced
    Sheepy

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] Application path

    This is how I would do it.

    Code:
            Dim HijackThisExe As String = My.Computer.FileSystem.SpecialDirectories.ProgramFiles & "\Trend Micro\HijackThis\HijackThis.exe"
            If IO.File.Exists(HijackThisExe) Then
                Process.Start(HijackThisExe)
            End If

  3. #3

    Thread Starter
    Member Sheepy_Daz's Avatar
    Join Date
    Mar 2006
    Posts
    39

    Re: [2005] Application path

    Thanks dude!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width