Time to share how I am using Success.cmd to add the registry key to prevent Personal Teams. I think that the possibility to run commands when doing feature updates is used way too little. We have the option to use SetupConfig.ini as well with Intune, Configuration Manager and Standalone of that is what we want to do. Upgrade from Windows 10 to Windows 11 with Setupconfig.ini and Intune – CCMEXEC.COM – Enterprise Mobility
Windows 10/11 also have the possibility to run command during the different phases of a Feature upgrade like, Preinstall.cmd. Failure.cmd and Success.cmd (the names are self-explaining). These files are honored independently on how a feature upgrade is initiated. More Information can be found here:
I have a separate computer I use to run Windows Insider(Canary) builds on and I am tired of removing Personal Teams every week for example. Using Success.cmd works great, been using it for a year now so I thought I write this to remind everyone that we can still run commands during a feature upgrade.
Do you want the command to run for each feature upgrade or only once? That is the first thing to decide.
Under the selected folder we create a subfolder with the correct GUID (there are many GUID generators out their example: https://guidgenerator.com/online-guid-generator.aspx )
And in that folder, I drop my success.cmd file which will then run each time my machine do a feature update.
In my success.cmd file I have only one line as I am interested in getting rid of Personal Teams.
reg.exe add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f
That will set the registry value so that Personal Teams will not reinstall after servicing. I can of course be used for so many other purposes, uninstalling built-in apps for example.
Using Success.cmd with Intune
I use a simple PowerShell script that copies the files to the correct location so I can deploy it to all my machines. I have deployed it as a Win32 app to be able to have more files in there in the future.
Copy-Item -Path "$($PSScriptRoot)\58cbda92-67b7-423c-a51b-583e763136ab" "$env:windir\Setup\Scripts\Update\Run\58cbda92-67b7-423c-a51b-583e763136ab" -Recurse -Force
I added my GUID folder – and the script as shown in the structure below.
I use a simple detection rule that the file exists in the folder.
Takeaway: we are still in control of the feature update process as we can run commands on failure and on success.