Merge pull request #4 from Admonstrator/update-readme

Update README and add funding information; enhance badge update workflow
This commit is contained in:
Aaron Viehl
2025-12-12 21:53:07 +01:00
committed by GitHub
5 changed files with 526 additions and 34 deletions

4
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
github: admonstrator
ko_fi: admon
buy_me_a_coffee: admon
custom: https://paypal.me/aaronviehl

110
.github/workflows/update-badges.yml vendored Normal file
View File

@@ -0,0 +1,110 @@
name: Update Repository Badges
on:
workflow_dispatch: # Manually triggered
schedule:
- cron: '0 0 * * 0' # Run weekly on Sunday at midnight
jobs:
update-badges:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch repository statistics
id: stats
run: |
# Get repository data
response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/Admonstrator/msoffice-removal-tool")
stars=$(echo "$response" | jq -r '.stargazers_count')
forks=$(echo "$response" | jq -r '.forks_count')
# Get latest release
release_response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/Admonstrator/msoffice-removal-tool/releases/latest")
latest_release=$(echo "$release_response" | jq -r '.tag_name // "N/A"')
echo "stars=$stars" >> $GITHUB_OUTPUT
echo "forks=$forks" >> $GITHUB_OUTPUT
echo "release=$latest_release" >> $GITHUB_OUTPUT
echo "✅ Fetched stats: $stars stars, $forks forks, release $latest_release"
- name: Generate README from template
run: |
# Helper function to create color based on count
get_color() {
local count=$1
if [ "$count" -ge 300 ]; then echo "brightgreen"
elif [ "$count" -ge 100 ]; then echo "green"
elif [ "$count" -ge 50 ]; then echo "yellowgreen"
elif [ "$count" -ge 10 ]; then echo "yellow"
else echo "orange"
fi
}
stars="${{ steps.stats.outputs.stars }}"
forks="${{ steps.stats.outputs.forks }}"
release="${{ steps.stats.outputs.release }}"
stars_color=$(get_color $stars)
# Get current date
update_date=$(date '+%Y-%m-%d')
# Copy template and replace badge URLs with static badges
cp readme.template.md readme.md
# Replace dynamic GitHub badges with static shields.io badges
sed -i "s|https://img.shields.io/github/v/release/Admonstrator/msoffice-removal-tool?style=for-the-badge&logo=github&color=blue|https://img.shields.io/badge/release-${release}-blue?style=for-the-badge\&logo=github|g" readme.md
sed -i "s|https://img.shields.io/github/stars/Admonstrator/msoffice-removal-tool?style=for-the-badge|https://img.shields.io/badge/stars-${stars}-${stars_color}?style=for-the-badge\&logo=github|g" readme.md
# Add last updated badge
echo "" >> readme.md
echo "<div align=\"center\">" >> readme.md
echo "" >> readme.md
echo "_Last updated: ${update_date}_" >> readme.md
echo "" >> readme.md
echo "</div>" >> readme.md
echo "✅ README generated with static badges successfully"
- name: Check for changes
id: check_changes
run: |
if git diff --quiet readme.md; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push changes
if: steps.check_changes.outputs.changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add readme.md
git commit -m "🤖 Update repository badges [automated]"
git push
- name: Create summary
run: |
echo "## 📊 Badge Update Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Repository Statistics" >> $GITHUB_STEP_SUMMARY
echo "- ⭐ Stars: ${{ steps.stats.outputs.stars }}" >> $GITHUB_STEP_SUMMARY
echo "- 🍴 Forks: ${{ steps.stats.outputs.forks }}" >> $GITHUB_STEP_SUMMARY
echo "- 📦 Latest Release: ${{ steps.stats.outputs.release }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ steps.check_changes.outputs.changed }}" == "true" ]; then
echo "✅ **readme.md was updated with new badge values**" >> $GITHUB_STEP_SUMMARY
else
echo " **No changes detected - badges are up to date**" >> $GITHUB_STEP_SUMMARY
fi

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Aaron Viehl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

220
readme.md
View File

@@ -1,53 +1,205 @@
# Microsoft Office Removal Tool
<div align="center">
```plain
__ _ _ _ ___ _
/ _(_)_ __ __ _| | ___| |_ ___ _ __ / __\_ _ ___| |_ ___ _ __ _ _
\ \| | '_ \ / _` | |/ _ \ __/ _ \| '_ \ / _\/ _` |/ __| __/ _ \| '__| | | |
_\ \ | | | | (_| | | __/ || (_) | | | | / / | (_| | (__| || (_) | | | |_| |
\__/_|_| |_|\__, |_|\___|\__\___/|_| |_| \/ \__,_|\___|\__\___/|_| \__, |
|___/ |___/
## Microsoft Office Removal Tool
Microsoft Office Removal Tool
by Aaron Viehl (Singleton Factory GmbH)
singleton-factory.de
```
**Remove Office installations with ease!**
## Synopsis
[![Latest Release](https://img.shields.io/github/v/release/Admonstrator/msoffice-removal-tool?style=for-the-badge&logo=github&color=blue)](https://github.com/Admonstrator/msoffice-removal-tool/releases/latest) [![License](https://img.shields.io/github/license/Admonstrator/msoffice-removal-tool?style=for-the-badge)](LICENSE) [![Stars](https://img.shields.io/github/stars/Admonstrator/msoffice-removal-tool?style=for-the-badge)](https://github.com/Admonstrator/msoffice-removal-tool/stargazers)
This script downloads the current Office uninstaller from Microsoft and tries to remove all Office installations on this computer.
---
If you wish it tries to install the newest Office365 build as well.
## 💖 Support the Project
You can choose between 2 methods of uninstalling:\
Default method will use the [Microsoft Support and Recovery Assistant (SaRA)](https://docs.microsoft.com/en-us/office365/troubleshoot/administration/sara-command-line-version) for uninstalling.\
By using `-UseSetupRemoval` the Office365 setup method will be used.
If you find this tool helpful, consider supporting its development:
## Parameter
[![GitHub Sponsors](https://img.shields.io/badge/GitHub-Sponsors-EA4AAA?style=for-the-badge&logo=github)](https://github.com/sponsors/admonstrator) [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/admon) [![Ko-fi](https://img.shields.io/badge/Ko--fi-FF5E5B?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/admon) [![PayPal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/aaronviehl)
| Parameter | Usage |
|------------------------|-------------------------------------------------------------------------|
| -InstallOffice365 | The script will try to install the newest Office365 build after removal |
| -SuppressReboot | No reboot will be executed after script is done |
| -UseSetupRemoval | Will use the official Office365 setup instead of SaRA |
| -RunAgain | Will skip the stage mechanism - whole script will run again |
| -Force | Non-interactive - No user interaction required |
| -SecondsToReboot [int] | Seconds until the computer will reboot |
</div>
## Example
---
``.\msoffice-removal-tool.ps1 -InstallOffice365 -SuppressReboot -Force``
## 📖 About
## Stage mechanism
This script downloads the current Office uninstaller from Microsoft and automatically removes all Office installations on your computer.
To make sure that the program will only do the necessary parts a _stage mechanism_ is builtin. After every stage a registry value will be written to ``HKLM:\Software\OEM\Singleton-Factory-GmbH\M365\Install\CurrentStage``
The script features two removal methods and can optionally install the newest Office 365 build after removal.
To overwrite all stages and restart the whole script use ``-RunAgain``.
Created by [Aaron Viehl](https://github.com/Admonstrator) for the community.
## Usage
> ⚠️ **Disclaimer** This is an independent project, not officially affiliated with Microsoft
You may use this script without explicit download:
---
## ✨ Features
- 🚀 **Automatic Removal** Removes all Office installations from your computer
- 🔄 **Flexible Methods** Choose between SaRA or Office365 setup removal
- 📦 **Optional Installation** Install Office365 after removal if desired
- 🛡️ **Safe Processing** Built-in stage mechanism to track progress
-**Flexible Options** Multiple parameters for customized removal
- 🔄 **Automatic Reboot** Optional automatic reboot after completion
---
## 📋 Requirements
| Requirement | Details |
|-------------|---------|
| **OS** | Windows (Windows 10 or later recommended) |
| **PowerShell** | PowerShell 5.0 or later |
| **Permissions** | Administrator privileges required |
| **Internet** | Required for downloading Office uninstaller |
---
## 🚀 Quick Start
Run the script without cloning the repository:
```powershell
iwr https://raw.githubusercontent.com/Admonstrator/msoffice-removal-tool/main/msoffice-removal-tool.ps1 -OutFile msoffice-removal-tool.ps1; powershell -ExecutionPolicy Bypass .\msoffice-removal-tool.ps1
```
---
## 🎛️ Parameters
The `msoffice-removal-tool.ps1` script supports the following parameters:
| Parameter | Description |
|-----------|-------------|
| `-InstallOffice365` | The script will try to install the newest Office365 build after removal |
| `-SuppressReboot` | No reboot will be executed after script is done |
| `-UseSetupRemoval` | Will use the official Office365 setup instead of SaRA for uninstalling |
| `-RunAgain` | Will skip the stage mechanism - whole script will run again |
| `-Force` | Non-interactive mode - No user interaction required |
| `-SecondsToReboot [int]` | Seconds until the computer will reboot (default: 120) |
---
## 📚 Usage Examples
### Standard Removal
Remove Office with the default SaRA method:
```powershell
.\msoffice-removal-tool.ps1
```
### Removal with Reinstallation
Remove Office and install the latest Office365 build:
```powershell
.\msoffice-removal-tool.ps1 -InstallOffice365
```
### Force Removal Without Reboot
Skip all prompts and prevent automatic reboot:
```powershell
.\msoffice-removal-tool.ps1 -Force -SuppressReboot
```
### Using Office Setup Removal
Use the Office365 setup method instead of SaRA:
```powershell
.\msoffice-removal-tool.ps1 -UseSetupRemoval -Force
```
### Complete Unattended Removal with Reinstallation
For fully unattended operation with reinstallation:
```powershell
.\msoffice-removal-tool.ps1 -InstallOffice365 -Force -SecondsToReboot 60
```
### Restarting the Entire Process
To skip the stage mechanism and run the entire script again:
```powershell
.\msoffice-removal-tool.ps1 -RunAgain -Force
```
---
## 🔍 Key Features Explained
### 🎯 Stage Mechanism
The script uses a built-in stage mechanism to ensure it only performs necessary steps and doesn't repeat work unnecessarily.
After every stage, a registry value is written to:
```
HKLM:\Software\OEM\Singleton-Factory-GmbH\M365\Install\CurrentStage
```
The mechanism is:
- ✅ Applied automatically
- ✅ Persistent across script restarts
- ✅ Can be overridden with `-RunAgain` parameter
### 🔧 Removal Methods
**Default Method (SaRA):**
- Uses the [Microsoft Support and Recovery Assistant](https://docs.microsoft.com/en-us/office365/troubleshoot/administration/sara-command-line-version)
- Recommended for most users
- Less intrusive than setup method
**Setup Method:**
- Uses the official Office365 setup
- More thorough removal
- Enabled with `-UseSetupRemoval` parameter
### 📦 Office365 Installation
When using `-InstallOffice365`, the script will:
- ✅ Automatically download the latest Office365 build
- ✅ Install Office365 after removal completes
- ✅ Configure the XML installation files from the `office365-installer/` directory
---
## 💡 Getting Help
Need assistance or have questions?
- 🐛 [Report issues on GitHub](https://github.com/Admonstrator/msoffice-removal-tool/issues) Bug reports and feature requests
- 📧 Contact via GitHub For private inquiries
---
## ⚠️ Disclaimer
This script is provided **as-is** without any warranty. Use it at your own risk.
It may potentially:
- 🔥 Remove important files or configurations
- 🔥 Cause system instability
- 🔥 Require manual recovery steps
**You have been warned!**
Always read the documentation carefully and understand what a script does before running it. Create a system restore point before executing this script.
---
## 📜 License
This project is licensed under the **MIT License** see the [LICENSE](LICENSE) file for details.
---
<div align="center">
**Made with ❤️ by [Admonstrator](https://github.com/Admonstrator)**
⭐ If you find this useful, please star the repository!
</div>

205
readme.template.md Normal file
View File

@@ -0,0 +1,205 @@
<div align="center">
## Microsoft Office Removal Tool
**Remove Office installations with ease!**
[![Latest Release](https://img.shields.io/github/v/release/Admonstrator/msoffice-removal-tool?style=for-the-badge&logo=github&color=blue)](https://github.com/Admonstrator/msoffice-removal-tool/releases/latest) [![License](https://img.shields.io/github/license/Admonstrator/msoffice-removal-tool?style=for-the-badge)](LICENSE) [![Stars](https://img.shields.io/github/stars/Admonstrator/msoffice-removal-tool?style=for-the-badge)](https://github.com/Admonstrator/msoffice-removal-tool/stargazers)
---
## 💖 Support the Project
If you find this tool helpful, consider supporting its development:
[![GitHub Sponsors](https://img.shields.io/badge/GitHub-Sponsors-EA4AAA?style=for-the-badge&logo=github)](https://github.com/sponsors/admonstrator) [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/admon) [![Ko-fi](https://img.shields.io/badge/Ko--fi-FF5E5B?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/admon) [![PayPal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/aaronviehl)
</div>
---
## 📖 About
This script downloads the current Office uninstaller from Microsoft and automatically removes all Office installations on your computer.
The script features two removal methods and can optionally install the newest Office 365 build after removal.
Created by [Aaron Viehl](https://github.com/Admonstrator) for the community.
> ⚠️ **Disclaimer** This is an independent project, not officially affiliated with Microsoft
---
## ✨ Features
- 🚀 **Automatic Removal** Removes all Office installations from your computer
- 🔄 **Flexible Methods** Choose between SaRA or Office365 setup removal
- 📦 **Optional Installation** Install Office365 after removal if desired
- 🛡️ **Safe Processing** Built-in stage mechanism to track progress
-**Flexible Options** Multiple parameters for customized removal
- 🔄 **Automatic Reboot** Optional automatic reboot after completion
---
## 📋 Requirements
| Requirement | Details |
|-------------|---------|
| **OS** | Windows (Windows 10 or later recommended) |
| **PowerShell** | PowerShell 5.0 or later |
| **Permissions** | Administrator privileges required |
| **Internet** | Required for downloading Office uninstaller |
---
## 🚀 Quick Start
Run the script without cloning the repository:
```powershell
iwr https://get.admon.me/remove-msoffice -OutFile msoffice-removal-tool.ps1; powershell -ExecutionPolicy Bypass .\msoffice-removal-tool.ps1
```
---
## 🎛️ Parameters
The `msoffice-removal-tool.ps1` script supports the following parameters:
| Parameter | Description |
|-----------|-------------|
| `-InstallOffice365` | The script will try to install the newest Office365 build after removal |
| `-SuppressReboot` | No reboot will be executed after script is done |
| `-UseSetupRemoval` | Will use the official Office365 setup instead of SaRA for uninstalling |
| `-RunAgain` | Will skip the stage mechanism - whole script will run again |
| `-Force` | Non-interactive mode - No user interaction required |
| `-SecondsToReboot [int]` | Seconds until the computer will reboot (default: 120) |
---
## 📚 Usage Examples
### Standard Removal
Remove Office with the default SaRA method:
```powershell
.\msoffice-removal-tool.ps1
```
### Removal with Reinstallation
Remove Office and install the latest Office365 build:
```powershell
.\msoffice-removal-tool.ps1 -InstallOffice365
```
### Force Removal Without Reboot
Skip all prompts and prevent automatic reboot:
```powershell
.\msoffice-removal-tool.ps1 -Force -SuppressReboot
```
### Using Office Setup Removal
Use the Office365 setup method instead of SaRA:
```powershell
.\msoffice-removal-tool.ps1 -UseSetupRemoval -Force
```
### Complete Unattended Removal with Reinstallation
For fully unattended operation with reinstallation:
```powershell
.\msoffice-removal-tool.ps1 -InstallOffice365 -Force -SecondsToReboot 60
```
### Restarting the Entire Process
To skip the stage mechanism and run the entire script again:
```powershell
.\msoffice-removal-tool.ps1 -RunAgain -Force
```
---
## 🔍 Key Features Explained
### 🎯 Stage Mechanism
The script uses a built-in stage mechanism to ensure it only performs necessary steps and doesn't repeat work unnecessarily.
After every stage, a registry value is written to:
```
HKLM:\Software\OEM\Singleton-Factory-GmbH\M365\Install\CurrentStage
```
The mechanism is:
- ✅ Applied automatically
- ✅ Persistent across script restarts
- ✅ Can be overridden with `-RunAgain` parameter
### 🔧 Removal Methods
**Default Method (SaRA):**
- Uses the [Microsoft Support and Recovery Assistant](https://docs.microsoft.com/en-us/office365/troubleshoot/administration/sara-command-line-version)
- Recommended for most users
- Less intrusive than setup method
**Setup Method:**
- Uses the official Office365 setup
- More thorough removal
- Enabled with `-UseSetupRemoval` parameter
### 📦 Office365 Installation
When using `-InstallOffice365`, the script will:
- ✅ Automatically download the latest Office365 build
- ✅ Install Office365 after removal completes
- ✅ Configure the XML installation files from the `office365-installer/` directory
---
## 💡 Getting Help
Need assistance or have questions?
- 🐛 [Report issues on GitHub](https://github.com/Admonstrator/msoffice-removal-tool/issues) Bug reports and feature requests
- 📧 Contact via GitHub For private inquiries
---
## ⚠️ Disclaimer
This script is provided **as-is** without any warranty. Use it at your own risk.
It may potentially:
- 🔥 Remove important files or configurations
- 🔥 Cause system instability
- 🔥 Require manual recovery steps
**You have been warned!**
Always read the documentation carefully and understand what a script does before running it. Create a system restore point before executing this script.
---
## 📜 License
This project is licensed under the **MIT License** see the [LICENSE](LICENSE) file for details.
---
<div align="center">
**Made with ❤️ by [Admonstrator](https://github.com/Admonstrator)**
⭐ If you find this useful, please star the repository!
</div>