Skip to content

Commit 46b18d4

Browse files
committed
Fix Custom Taskbar from breaking on Win 11
1 parent 20a19ed commit 46b18d4

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

Diff for: packages/common.vm/common.vm.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
33
<metadata>
44
<id>common.vm</id>
5-
<version>0.0.0.20240913</version>
5+
<version>0.0.0.20241002</version>
66
<description>Common libraries for VM-packages</description>
77
<authors>Mandiant</authors>
88
</metadata>

Diff for: packages/common.vm/tools/vm.common/vm.common.psm1

+2
Original file line numberDiff line numberDiff line change
@@ -1523,6 +1523,8 @@ public class Shell {
15231523
$SHCNE_ASSOCCHANGED = 0x08000000
15241524
$SHCNF_IDLIST = 0
15251525
[void][Shell]::SHChangeNotify($SHCNE_ASSOCCHANGED, $SHCNF_IDLIST, [IntPtr]::Zero, [IntPtr]::Zero)
1526+
# Refresh the Taskbar
1527+
Stop-Process -Name explorer -Force # This restarts the explorer process so that the new taskbar is displayed.
15261528
} catch {
15271529
VM-Write-Log-Exception $_
15281530
}

Diff for: packages/installer.vm/installer.vm.nuspec

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
33
<metadata>
44
<id>installer.vm</id>
5-
<version>0.0.0.20240402</version>
5+
<version>0.0.0.20241002</version>
66
<authors>Mandiant</authors>
77
<description>Generic installer for custom virtual machines.</description>
88
<dependencies>
9-
<dependency id="common.vm" />
9+
<dependency id="common.vm" version="0.0.0.20241002" />
1010
</dependencies>
1111
</metadata>
1212
</package>
13-

Diff for: packages/installer.vm/tools/chocolateyinstall.ps1

-9
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ try {
3232
}
3333
VM-Write-Log "INFO" "Packages installation complete"
3434

35-
## Configure taskbar with custom Start Layout if it exists.
36-
$customLayout = Join-Path ${Env:VM_COMMON_DIR} "CustomStartLayout.xml"
37-
if (Test-Path $customLayout) {
38-
Import-StartLayout -LayoutPath $customLayout -MountPath "C:\"
39-
Stop-Process -Name explorer -Force # This restarts the explorer process so that the new taskbar is displayed.
40-
} else {
41-
VM-Write-Log "WARN" "CustomStartLayout.xml missing. No items will be pinned to the taskbar."
42-
}
43-
4435
# Set Profile/Version specific configurations
4536
VM-Write-Log "INFO" "Beginning Windows OS VM profile configuration changes"
4637
$configPath = Join-Path $Env:VM_COMMON_DIR "config.xml" -Resolve

0 commit comments

Comments
 (0)