Skip to content

Commit

Permalink
Merge pull request #1137 from mandiant/layout-fix
Browse files Browse the repository at this point in the history
Fix Custom Taskbar from breaking on Win 11
  • Loading branch information
Ana06 authored Oct 7, 2024
2 parents 20a19ed + 46b18d4 commit fae4735
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/common.vm/common.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>common.vm</id>
<version>0.0.0.20240913</version>
<version>0.0.0.20241002</version>
<description>Common libraries for VM-packages</description>
<authors>Mandiant</authors>
</metadata>
Expand Down
2 changes: 2 additions & 0 deletions packages/common.vm/tools/vm.common/vm.common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,8 @@ public class Shell {
$SHCNE_ASSOCCHANGED = 0x08000000
$SHCNF_IDLIST = 0
[void][Shell]::SHChangeNotify($SHCNE_ASSOCCHANGED, $SHCNF_IDLIST, [IntPtr]::Zero, [IntPtr]::Zero)
# Refresh the Taskbar
Stop-Process -Name explorer -Force # This restarts the explorer process so that the new taskbar is displayed.
} catch {
VM-Write-Log-Exception $_
}
Expand Down
5 changes: 2 additions & 3 deletions packages/installer.vm/installer.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
<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.20241002</version>
<authors>Mandiant</authors>
<description>Generic installer for custom virtual machines.</description>
<dependencies>
<dependency id="common.vm" />
<dependency id="common.vm" version="0.0.0.20241002" />
</dependencies>
</metadata>
</package>

9 changes: 0 additions & 9 deletions packages/installer.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ try {
}
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."
}

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

0 comments on commit fae4735

Please sign in to comment.