So This Post is going to cover the Rollback Recovery Modules that plug into the In Place Upgrade TS. There are three parts of the process, two Task Sequences parts, and a scheduled task with powershell scripts.
For more info about Roll Back, check out my previous post: Automated Client Recovery from Rollback or OS Uninstall
So basically before the upgrade, it copies files (Scripts) into place that it needs to recover from a rollback. It then also creates scheduled tasks that run on start up that trigger the script. The script looks for the “RollBack” registry key, if it finds it, it runs the remediation script.
- Deletes Rollback Values from Registry (If the exist from a previous failure)
- Makes a Temporary folder %ProgramData%\RollBackRecovery to place scripts
- Copies Scripts to Folder
- Appends a line to the SetupRollBack.cmd Template file
- Creates Scheduled task that will call the script if rollback happens
- Creates Scheduled task that will set the Legal Text to RollBack
- Creates Scheduled task that will reset the Legal Text to default after Remediation
After the OS is successfully upgraded, it cleans up the scheduled tasks and scripts
So the Upgrade TS actually creates all of those, and by the end of the TS, those will all be gone as well. They are all used for Recovery or Cleanup
This script is the brains… does a lot of stuff including copying logs to a network share, so please look at it and update for your environment. It checks for HKLM:\SYSTEM\Setup\RollBack to know if it should engage or not. It also leaves “bread crumbs” in the registry to know where the script left off incase the user reboots it while it is trying to recovery the CM Client.
Then there are two Scheduled tasks that deal with the Legal Text
One that set its to “Upgrade Failed, System Rolled Back….” and one that sets it back to your default.
It runs at both Startup and when Group Policy triggers… because I don’t want GPO change it back to the default before the user had a chance to read it.
The script is simple, it’s just setting those registry keys and logging it.
The next task sets it back to the Default and cleans up the Scheduled Tasks.
It Runs at Logon, because I assume if someone logged on, they saw the message and it can now be reset.
The scheduled task & script will continue to run at logon until the RollBackRecovery process has been completed and the WaaS_Stage has been updated to Deployment_RollBack. Once that happens, then the scheduled task gets cleaned up. #Magic
I hope that clears things up, about how the Rollback Recovery Module works in the WaaS 2.0 Process. It should help prevent you from find yourself with a messed up client if the setup engine fails and causes a rollback.