diff --git a/packages/installer.vm/installer.vm.nuspec b/packages/installer.vm/installer.vm.nuspec index cd1d883c8..a320e5c5c 100644 --- a/packages/installer.vm/installer.vm.nuspec +++ b/packages/installer.vm/installer.vm.nuspec @@ -2,7 +2,7 @@ installer.vm - 0.0.0.20231020 + 0.0.0.20231120 Mandiant Generic installer for custom virtual machines. diff --git a/packages/installer.vm/tools/chocolateyinstall.ps1 b/packages/installer.vm/tools/chocolateyinstall.ps1 index c2017bcd5..636936d42 100644 --- a/packages/installer.vm/tools/chocolateyinstall.ps1 +++ b/packages/installer.vm/tools/chocolateyinstall.ps1 @@ -32,6 +32,23 @@ try { } VM-Write-Log "INFO" "Packages installation complete" + # Create an Admin Command Prompt shortcut to pin to taskbar + $toolName = 'Admin Command Prompt' + $category = 'Utilities' + $toolDir = Join-Path ${Env:TOOL_LIST_DIR} + + $executablePath = Join-Path ${Env:SystemRoot} 'system32\cmd.exe' + $shortcutDir = Join-Path $toolDir $category -Resolve + $shortcut = Join-Path $shortcutDir "$toolName.lnk" + + Install-ChocolateyShortcut -shortcutFilePath $shortcut -targetPath $executablePath -RunAsAdmin + VM-Assert-Path $shortcut + + ## Configure taskbar with custom Start Layout + $customLayout = Join-Path ${Env:USERPROFILE} 'Desktop\CustomStartLayout.xml' + Import-StartLayout -LayoutPath $customLayout -MountPath "C:\" + Stop-Process -Name explorer -Force # This restarts the explorer process so that the new taskbar is displayed. + # Set Profile/Version specific configurations VM-Write-Log "INFO" "Beginning Windows OS VM profile configuration changes" $configPath = Join-Path $Env:VM_COMMON_DIR "config.xml" -Resolve @@ -226,4 +243,3 @@ Thank you! } catch { VM-Write-Log-Exception $_ } -