Search code examples
serverwindows-server-2012windows-server-2012-r2wallpaper

unattended wim deployment backinfo


I have a script that deploys a WIM to a partition and makes it bootable and it uses an unattend.xml to configure the name and everything else. I include the BackInfo.exe with settings for it and when the OS boots up I have it run a logon script to initialize the OS for a bunch of stuff. I have tried in the script to run the BackInfo.exe, I have tried in the unattend.xml, I have tried adding a registry key into HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, I have tried adding a scheduled task.

No matter what happens the background is always the default one and never set to the generated one from BackInfo. When I run the command manually it works perfectly. I for the life of me can't seem to get this working.

Any help would be very much appreciated!


Solution

  • So turns out I had placed the code into the FirstLogonCommands section which turns out wouldn't work, I changed it over to LogonCommands.

            <LogonCommands>
                <AsynchronousCommand wcm:action="add">
                    <CommandLine>%SystemDrive%\Applications\BackInfo\BackInfo.exe</CommandLine>
                    <Description>BgInfo</Description>
                    <Order>1</Order>
                </AsynchronousCommand>
            </LogonCommands>
    

    Hopefully this can help someone else in the future and prevent them from wasting time trying to figure out other ways.