Adding multiple steam desktop shortcuts
I've just read this page about creating desktop shortcuts for my games, however steam recently broke for me and I lost all my shortcuts. Although I can create them one at a time, I have almost 215 games and it would take me at least an hour to sort them. Is there an easier way to create a mass amount of shortcuts or do I have to do it manually?
If it helps, I use fences
Thanks in advance.
If you are a developer, use this: https://gist.github.com/AndrewSav/872b1469e11d9a4b802c
It's a c# script that goes through your installed games and create a shortcut for each. You will need to compile this script either with VS or from command line with csc.exe or run it form LinqPad. All paths are tried to be automatically detected, so if this does not work or not suitable, you need to change the code to hardcode them.
To me this proved to be the fastest and most practical method to achieve what I wanted
I wrote this AutoHotkey script to generate shortcuts (no icon images though)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Loop, *, 0, 0
{
if RegExMatch(A_LoopFileName, "appmanifest_\d+\.acf") {
FileToRead = %A_LoopFileName%
TempFile := "shortcuts_tempinfo.txt"
FileDelete, %TempFile%
RunWait,shortcuts.bat %FileToRead% >> %TempFile%,,Hide
FileRead,Output,%TempFile%
FileDelete,%TempFile%
FoundPos := RegexMatch(Output, """name"".*?""(.*?)""", SubPat)
Name := RegExReplace(SubPat1, "[^a-zA-Z0-9 ]")
StringReplace, LoopFileName, A_LoopFileName, appmanifest_
StringReplace, LoopFileName, LoopFileName, .acf
IniWrite, steam://rungameid/%LoopFileName%, %A_Desktop%\%Name%.url, InternetShortcut, URL
}
}
MsgBox, Finished
It needs to be placed inside your SteamApps folder with shortcuts.bat
(below)
@echo off
type %1
The script scans through your appmanifest files and creates desktop shortcuts like Steam would, except for the missing icon. (I couldn't figure out a way to find the icon for a game yet due to varying game folder structures)