diff --git a/packages/cyberchef.vm/tools/chocolateyinstall.ps1 b/packages/cyberchef.vm/tools/chocolateyinstall.ps1 index ed068c961..a9b378215 100644 --- a/packages/cyberchef.vm/tools/chocolateyinstall.ps1 +++ b/packages/cyberchef.vm/tools/chocolateyinstall.ps1 @@ -23,11 +23,11 @@ try { $shortcut = Join-Path $shortcutDir "$toolName.lnk" $executableCmd = Join-Path ${Env:WinDir} "system32\cmd.exe" -Resolve $htmlPath = Join-Path $toolDir "CyberChef_v10.19.0.html" -Resolve - $arguments = "start chrome $htmlPath && exit" + $chromePath = Join-Path ${Env:ProgramFiles} "Google\Chrome\Application\chrome.exe" + $arguments = "start `"`" `"$chromePath`" $htmlPath && exit" $executableArgs = "/C $arguments" - $iconLocation = "%ProgramFiles%\Google\Chrome\Application\chrome.exe" - Install-ChocolateyShortcut -ShortcutFilePath $shortcut -TargetPath $executableCmd -Arguments $executableArgs -WorkingDirectory $toolDir -WindowStyle 7 -IconLocation $iconLocation + Install-ChocolateyShortcut -ShortcutFilePath $shortcut -TargetPath $executableCmd -Arguments $executableArgs -WorkingDirectory $toolDir -WindowStyle 7 -IconLocation $chromePath VM-Assert-Path $shortcut } catch {