Add files via upload

This commit is contained in:
Belim
2025-05-23 17:20:33 +02:00
committed by GitHub
parent 0a18cabf55
commit 091b6b049a
+18 -27
View File
@@ -1,27 +1,18 @@
#Requires -RunAsAdministrator
# Check if running as Administrator
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Warning "This script is recommended to be run as Administrator for best results."
# Decide if you want to force exit or just warn
# exit # Uncomment to force admin
}
# Function to show a message box
function Show-MessageBox {
param (
[string]$message,
[string]$title = "Information"
)
Add-Type -AssemblyName PresentationFramework
[System.Windows.MessageBox]::Show($message, $title)
}
# Stop Windows Explorer
Stop-Process -Name explorer -Force
# Start Windows Explorer
Start-Process explorer
# Show message box
Show-MessageBox -message "Windows Explorer has been restarted successfully." -title "Crapfixer"
# Function to show a message box
function Show-MessageBox {
param (
[string]$message,
[string]$title = "Information"
)
Add-Type -AssemblyName PresentationFramework
[System.Windows.MessageBox]::Show($message, $title)
}
# Stop Windows Explorer
Stop-Process -Name explorer -Force
# Start Windows Explorer
Start-Process explorer
# Show message box
Show-MessageBox -message "Windows Explorer has been restarted successfully." -title "CrapFixer"