From 4951414eb572a735e26694621f29feb9bc513138 Mon Sep 17 00:00:00 2001 From: d35ha Date: Wed, 24 Jul 2024 08:37:46 +0000 Subject: [PATCH] Fix the unresolved chrome path at cyberchef.vm --- packages/cyberchef.vm/tools/chocolateyinstall.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 {