Skip to content

Instantly share code, notes, and snippets.

@eddiezato
Last active November 5, 2024 07:04
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.
PowerShell: script to generate .lnk for Google Chrome
$shell = New-Object -comObject WScript.Shell
$shortcut = $shell.CreateShortcut("$PSScriptRoot\Google Chrome.lnk")
$shortcut.TargetPath = "$PSScriptRoot\app\chrome.exe"
$shortcut.WorkingDirectory = "$PSScriptRoot\app"
$shortcut.Arguments = (
'--user-data-dir=Z:\ChromeData',
'--disk-cache-size=104857600',
'--disable-component-update',
'--disable-default-apps',
'--disable-sync',
'--enable-benchmarking',
'--variations-server-url=nul',
'--variations-insecure-server-url=nul',
'--enable-features=TurnOffStreamingMediaCachingAlways',
'-no-default-browser-check',
'--disable-features=ScreenAI,ScreenAIOCREnabled'
# '--disable-features=OptimizationHints,OptimizationGuideModelDownloading,OptimizationHintsFetching,OptimizationTargetPrediction'
) -join ' '
$shortcut.IconLocation = "$PSScriptRoot\Chrome.ico"
$shortcut.Save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment