Menu
CCMEXEC.COM – Enterprise Mobility
  • Home
  • General
  • Configuration Manager
  • Windows 10
  • Intune
  • GitHub
  • Windows 11
  • About the author
CCMEXEC.COM – Enterprise Mobility

Windows Servicing, Personal Teams and Success.cmd

Posted on March 15, 2023March 15, 2023 by Jörgen Nilsson

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:
https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-enable-custom-actions?view=windows-11

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.
%windir%\System32\update\run
Or
%windir%\System32\update\runonce

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.

  • Intune
  • Success.cmd
  • Windows Serviing
  • Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    My name is Jörgen Nilsson and I work as a Senior Consultant at Onevinn in Malmö, Sweden. This is my blog where I will share tips and stuff for my own and everyone elses use on Enterprise Mobility and Windows related topics.
    All code is provided "AS-IS" with no warranties.

    Tweets by ccmexec

    Recent Posts

    • Windows Servicing, Personal Teams and Success.cmd
    • Windows MDM Security Baseline – Settings Catalog
    • Configuring MS Edge Security Baseline v107 using Settings Catalog
    • Configuring Desktop App Installer using CSP and script?!
    • Customizing Taskbar and Start in Windows 11 22h2 with PowerShell

    ©2023 CCMEXEC.COM – Enterprise Mobility | WordPress Theme by Superb Themes
    This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
    Privacy & Cookies Policy

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
    Non-necessary
    Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
    SAVE & ACCEPT