Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 670 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 670 Bytes

Shortcut

Shortcut is Go (golang) lib for create windows shortcut with a specified name, icon and target directory.

Install

go get github.com/jxeng/shortcut

Usage

// Create a shortcut on desktop
shortcut.CreateDesktopShortcut("google", "https://google.com", "/path/to/logo.ico", ".")

// Advanced useage
sc := Shortcut{
	ShortcutPath:     "./google.lnk",
	Target:           "https://google.com",
	IconLocation:     "%SystemRoot%\\System32\\SHELL32.dll,0",
	Arguments:        "",
	Description:      "",
	Hotkey:           "",
	WindowStyle:      "1",
	WorkingDirectory: "",
}
err := shortcut.Create(sc)