flare-vm
flare-vm copied to clipboard
Error with packages installer.vm
What's the problem?
At the end of installation packages to the system there is an error with package.
Steps to Reproduce
clean iso of windows 11 from microsoft -> new vm on virtualbox -> default selected packages on install stage
Environment
- VirtualBox
- Windows 11 - 10.0.22631
- 5.1.22621.3880
- 2.3.0
- Boxstarter|3.0.3
Additional Information
terminal_logs.txt chocolatey.log chocolatey.1.log chocolatey.2.log log.txt
With the provided information it is not clear to me which package fails and what the error is. Please provide the console output as required in the bug issue template so that we are able to help you.
Thanks for reporting this @monfora!
@Ana06 I think I see the issue here. It looks like the CustomStartLayout.xml is not being applied (errors out while trying to import it) and this seems to be an issue that others on newer Windows 11 builds are also experiencing: https://www.reddit.com/r/SCCM/comments/1cus7g3/importstartlayout_for_taskbar_stopped_working/
It seems that Microsoft may have either changed the format spec (though I can't find an updated one on the internet), or they are disallowing this ability via PowerShell (some people say their old configs still work when applied via GPO).
Fortunately, it looks like there is a simple fix, which is to store the layout as LayoutModification.xml and place it in C:\Users\default\AppData\Local\Microsoft\Windows\Shell\.
I just tested the fix on a Windows 10 pre-built FlareVM and it worked fine. I'll need to get a proper new Windows 11 build set up to test it there. I also need to test it from a fresh ISO through the full build to see if there may be any other tweaking that is needed (my Win 11 test should help with that as well).
To test, once the file is named correctly and placed in that location (and assuming you've removed any other pinned icons), you can run Stop-Process -Name explorer -Force and it should work. This will need to be adjusted in our repo and installer.vm if it is the route we decide to take.
fixed by adding terminal log in first message
Thanks for reporting this @monfora!
@Ana06 I think I see the issue here. It looks like the
CustomStartLayout.xmlis not being applied (errors out while trying to import it) and this seems to be an issue that others on newer Windows 11 builds are also experiencing: https://www.reddit.com/r/SCCM/comments/1cus7g3/importstartlayout_for_taskbar_stopped_working/It seems that Microsoft may have either changed the format spec (though I can't find an updated one on the internet), or they are disallowing this ability via PowerShell (some people say their old configs still work when applied via GPO).
Fortunately, it looks like there is a simple fix, which is to store the layout as
LayoutModification.xmland place it inC:\Users\default\AppData\Local\Microsoft\Windows\Shell\.I just tested the fix on a Windows 10 pre-built FlareVM and it worked fine. I'll need to get a proper new Windows 11 build set up to test it there. I also need to test it from a fresh ISO through the full build to see if there may be any other tweaking that is needed (my Win 11 test should help with that as well).
To test, once the file is named correctly and placed in that location (and assuming you've removed any other pinned icons), you can run
Stop-Process -Name explorer -Forceand it should work. This will need to be adjusted in our repo andinstaller.vmif it is the route we decide to take.
Thanks for fix.
my netcat.vm package is not installing, other tools are pinned now at taskbar by following the instructions, but the desktop wallpaper is still not changed! @emtuls
Still this error!
The content of CustomStartLayout.xml file is as follows, which is created by itself when installer is run!
<?xml version="1.0" encoding="utf-8"?>
<LayoutModificationTemplate
xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"
Version="1">
<LayoutOptions StartTileGroupCellWidth="6" StartTileGroupsColumnCount="1" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
<CustomTaskbarLayoutCollection PinListPlacement="Replace">
<defaultlayout:TaskbarLayout>
<taskbar:TaskbarPinList>
<taskbar:DesktopApp DesktopApplicationLinkPath="%AppData%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk"/>
<taskbar:DesktopApp DesktopApplicationLinkPath="%TOOL_LIST_DIR%\Productivity Tools\Windows Terminal.lnk"/>
<taskbar:DesktopApp DesktopApplicationLinkPath="%TOOL_LIST_DIR%\Utilities\CyberChef.lnk"/>
<taskbar:DesktopApp DesktopApplicationLinkPath="%TOOL_LIST_DIR%\Disassemblers\ida.lnk"/>
<taskbar:DesktopApp DesktopApplicationLinkPath="%TOOL_LIST_DIR%\Networking\fakenet.lnk"/>
<taskbar:DesktopApp DesktopApplicationLinkPath="%TOOL_LIST_DIR%\PE\CFF Explorer.lnk"/>
<taskbar:DesktopApp DesktopApplicationLinkPath="%TOOL_LIST_DIR%\Utilities\procexp.lnk"/>
<taskbar:DesktopApp DesktopApplicationLinkPath="%TOOL_LIST_DIR%\Utilities\procmon.lnk"/>
<taskbar:DesktopApp DesktopApplicationLinkPath="%TOOL_LIST_DIR%\Productivity Tools\notepad++.lnk"/>
<taskbar:DesktopApp DesktopApplicationLinkPath="%TOOL_LIST_DIR%\Productivity Tools\VisualStudio.lnk"/>
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
</CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>
Noted! Will try to take a look this week or very soon. Some other priorities came up, but this is on my radar. Thank you for the follow up. :)
fixed by adding terminal log in first message
What exactly did you do here? and post that did you restart the installation?
@luffy-cmd I believe they were responding to @Ana06's message in regards to adding additional logs to their message, not actually fixing of the issue at hand.
In regards to the issue, I have a PR in that should fix the problem once it is merged: https://github.com/mandiant/VM-Packages/pull/1137
For now, a temporary workaround that should work would be to copy lines 45-189 from installer.vm (https://github.com/mandiant/VM-Packages/blob/6b95e46f12c9e6fd6247bd9fe271203b0008315d/packages/installer.vm/tools/chocolateyinstall.ps1#L45C5-L190C1) and run them in an admin powershell after the installation fails.
After this, you can then run the following commands to have the taskbar set as expected:
Copy-Item "${Env:VM_COMMON_DIR}\CustomStartLayout.xml" "C:\Users\default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml"
Stop-Process -Name explorer -Force
This should now be fixed with https://github.com/mandiant/flare-vm/pull/617 and https://github.com/mandiant/VM-Packages/pull/1137 having been merged.