Skip to content

Commit

Permalink
Fix Custom Taskbar from breaking on Win 11
Browse files Browse the repository at this point in the history
  • Loading branch information
emtuls committed Sep 13, 2024
1 parent 6b95e46 commit d7d2b13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/installer.vm/installer.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>installer.vm</id>
<version>0.0.0.20240402</version>
<version>0.0.0.20240912</version>
<authors>Mandiant</authors>
<description>Generic installer for custom virtual machines.</description>
<dependencies>
Expand Down
11 changes: 2 additions & 9 deletions packages/installer.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,8 @@ try {
VM-Write-Log-Exception $_
}
VM-Write-Log "INFO" "Packages installation complete"

## Configure taskbar with custom Start Layout if it exists.
$customLayout = Join-Path ${Env:VM_COMMON_DIR} "CustomStartLayout.xml"
if (Test-Path $customLayout) {
Import-StartLayout -LayoutPath $customLayout -MountPath "C:\"
Stop-Process -Name explorer -Force # This restarts the explorer process so that the new taskbar is displayed.
} else {
VM-Write-Log "WARN" "CustomStartLayout.xml missing. No items will be pinned to the taskbar."
}

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"
Expand Down

0 comments on commit d7d2b13

Please sign in to comment.