Created
February 2, 2016 18:09
-
-
Save absynce/0c27ccb8e0715e3a28e1 to your computer and use it in GitHub Desktop.
Create a Chrome shortcut link to run a URL as an application. It can set link icon location and to open maximized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CreateChromeAppLink { | |
Param( | |
[string]$chromePath = """C:\Program Files (x86)\Google\Chrome\Application\chrome.exe`"" | |
) | |
$appBasePath = "C:\your\app\" | |
$linkPath = "C:\Users\Public\Desktop\YourApp.lnk" | |
$appUrl = "https://test.com" | |
$shell = New-Object -COM WScript.Shell | |
$shortcut = $shell.CreateShortcut($linkPath) ## Open the lnk | |
$shortcut.TargetPath = $chromePath | |
$shortcut.Arguments = "--start-maximized --app=" + $appUrl | |
$shortcut.Description = "Your app link" ## This is the "Comment" field | |
$Shortcut.IconLocation = $appBasePath + "app.ico" ## E.g. "hotplug.dll,0", "C:\your\app\app.ico" | |
$shortcut.Save() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment