{"id":17193811,"url":"https://github.com/darealshinji/mkshortcut","last_synced_at":"2025-04-13T20:11:32.939Z","repository":{"id":79186738,"uuid":"321036387","full_name":"darealshinji/mkshortcut","owner":"darealshinji","description":"Create a Shell Link a.k.a. Shortcut on Windows from command line","archived":false,"fork":false,"pushed_at":"2024-11-24T20:09:24.000Z","size":55,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T10:46:51.304Z","etag":null,"topics":["link","shell-link","shortcut","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darealshinji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-12-13T10:18:54.000Z","updated_at":"2025-01-29T12:22:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"d99342b1-12a1-49dd-a1e5-cd9bff272ec7","html_url":"https://github.com/darealshinji/mkshortcut","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darealshinji%2Fmkshortcut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darealshinji%2Fmkshortcut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darealshinji%2Fmkshortcut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darealshinji%2Fmkshortcut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darealshinji","download_url":"https://codeload.github.com/darealshinji/mkshortcut/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248774980,"owners_count":21159534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["link","shell-link","shortcut","windows"],"created_at":"2024-10-15T01:44:59.540Z","updated_at":"2025-04-13T20:11:32.912Z","avatar_url":"https://github.com/darealshinji.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a simple C++ command line program to create so-called Shell Links, also known as Shortcuts or .lnk files.\r\n\r\nMotivation for writing it was the lack of such a tool coming preinstalled on Windows 10 (mklink.exe\r\nis for hard/symbolic links) and to get a better understanding on how to use the IShellLink class.\r\nIt was published into its own repository in the hope that people will have it easier to find it.\r\nCheck out https://github.com/libyal/liblnk if you don't want to use the Windows API.\r\n\r\nNotes:\r\n* released under MIT license\r\n* does not create .url files (those are text files in an INI format)\r\n* no header file, just copy the code you need\r\n* Unicode and ANSI using `tchar.h`\r\n* requires linkage against `ole32.lib` on MSVC and `-lole32 -luuid` on GCC/MinGW\r\n\r\nCompile:\r\n* Visual Studio 2019: open the provided solution file (mkshortcut.sln) and select *Build* -\u003e *Build solution*\r\n* the provided Makefile works with Microsoft nmake and GNU make\r\n\r\n\r\nUsage example\r\n-------------\r\n*(assuming Firefox installed in typical directory)*\r\n\r\nOpen a command promt, move to Firefox's directory and create a shortcut:\r\n```\r\ncd \"C:\\Program Files\\Mozilla Firefox\"\r\n\r\nC:\\path\\to\\mkshortcut.exe /o:\"%homedrive%%homepath%\\Desktop\\Firefox in disguise.lnk\" ^\r\n  /t:firefox.exe /tfull /w:\"C:/\" /a:Windows ^\r\n  /i:\"..\\Internet Explorer\\iexplore.exe\" /ifull ^\r\n  /d:\"Firefox (really)\" /k:saf\r\n```\r\n\r\n`/o:\"%homedrive%%homepath%\\Desktop\\Firefox in disguise.lnk\"`\r\n -\u003e the shortcut will be placed on your desktop and called \"Firefox in disguise\" based on the filename\r\n\r\n`/t:firefox.exe` -\u003e shortcut target relative to your working directory\r\n\r\n`/tfull` -\u003e resolves relative path *firefox.exe* to the full path *\"C:\\Program Files\\Mozilla Firefox\\firefox.exe\"*\r\n\r\n`/w:\"C:/\"` -\u003e set the working directory to *C:/*\r\n\r\n`/a:Windows` -\u003e launch Firefox with *Windows* as command line parameter;\r\nthis will make Firefox open *Windows* wich is resolved from the working directory (C:/) and therefor the contents of *C:\\Windows* is shown\r\n\r\n`/i:\"..\\Internet Explorer\\iexplore.exe\"` -\u003e use the Internet Explorer icon\r\n\r\n`/ifull` -\u003e resolves *\"..\\Internet Explorer\\iexplore.exe\"* to the full path *\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"*\r\n\r\n`/d:\"Firefox (really)\"` -\u003e set tooltip description\r\n\r\n`/k:saf` -\u003e set \"hotkey\" to **S**hift+**A**lt+**F**; pressing this combination when being \"on the desktop\" will open the shortcut\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarealshinji%2Fmkshortcut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarealshinji%2Fmkshortcut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarealshinji%2Fmkshortcut/lists"}