Skip to content

Instantly share code, notes, and snippets.

@eddiezato
Last active March 21, 2022 06:12
Show Gist options
  • Save eddiezato/7217a0e3294dae81c6632c8e4c9c4397 to your computer and use it in GitHub Desktop.
Save eddiezato/7217a0e3294dae81c6632c8e4c9c4397 to your computer and use it in GitHub Desktop.
Generate .lnk for Google Chrome
$shell = New-Object -comObject WScript.Shell
$shortcut = $shell.CreateShortcut("$PSScriptRoot\chrome.lnk")
$shortcut.TargetPath = "$PSScriptRoot\App\chrome.exe"
$shortcut.WorkingDirectory = "$PSScriptRoot\App"
$shortcut.Arguments = (
'--user-data-dir=..\UserData',
'--disk-cache-size=104857600',
'--disable-component-update',
'--disable-default-apps',
'--disable-sync',
'--enable-benchmarking',
'--enable-features=TurnOffStreamingMediaCachingAlways',
'--disable-features=OptimizationHints'
) -join ' '
$shortcut.IconLocation = "$PSScriptRoot\App\chrome.exe"
$shortcut.Save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment