-2

I'm making a application for steam games. Because shortcuts steal zone from desktop ,so i make this project for this. I want add a "drop file here to add list" when he put to shortcut on program i need get the app id, then it will automatically add to list.I added the drop file script!! But i dont know how to get URL title from assembly..There is a screenshot. I want get url from shortcut like this.

SCREENSHOT 1

SCREENSHOT 2

!! I made the drop file script.. I just have problems at get url script.

SAMOHACKS
  • 1
  • 3

1 Answers1

1

Opening steam applications is very simple, if you know the location of your steam.exe.

 System.Diagnostics.Process.Start(@"C:\Program Files (x86)\Steam\steam.exe","steam://rungameid/730");

In my case (i think its default as well) you can start an application just by giving the path of the steam.exe and passing the content of the shortcut as argument.

Edit: If you want to get the argument value you can just read the File using

File.ReadAllLines(path);

And get the argument from the string, which will then look like this:

        string[] lines = File.ReadAllLines(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Golf With Your Friends.url");
        string argument = lines.ToList().FirstOrDefault(item => { return item.Contains("steam://"); }).Replace("URL=", "");
        System.Diagnostics.Process.Start(@"C:\Program Files (x86)\Steam\steam.exe", argument);
lorenzw
  • 366
  • 1
  • 10