Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Custom Taskbar from breaking on Win 11 #1137

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading