-1

My goal is to launch a file using this in vb.net via the click of a button..

System.Diagnostics.Process.Start("X:\Desktop\Brutal Doom\PLAY ME BRUTAL DOOM!!!.pk3") 

Which works, however as soon as I move to my laptop or another computer the button can no longer find the file as the drive letter has changed.. is there a way to code this so that it is no longer dependable on the drive letter and only will see \Brutal Doom\PLAM ME BRUTAL DOOM!!!.pk3 thus working on whatever computer I put the folder on...

  • Yay, I am not the only one playing Doom and programming in Visual Basic! -- You could use an `OpenFileDialog` to have the user locate the file the first time the application starts, then just save the path in `My.Settings`. – Visual Vincent Apr 18 '16 at 16:53

1 Answers1

1

Are you basically looking for this? How to get a path to the desktop for current user in C#? ie System.Diagnostics.Process.Start(My.Computer.FileSystem.SpecialDirectories.Desktop & "\Brutal Doom\PLAY ME BRUTAL DOOM!!!.pk3")

Community
  • 1
  • 1
tolanj
  • 3,651
  • 16
  • 30