mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-14 08:58:44 -05:00
Compare commits
2 Commits
24.11.25
...
e6513c32e9
Author | SHA1 | Date | |
---|---|---|---|
e6513c32e9 | |||
e112296069 |
@ -439,6 +439,14 @@
|
|||||||
"link": "https://dotnet.microsoft.com/download/dotnet/8.0",
|
"link": "https://dotnet.microsoft.com/download/dotnet/8.0",
|
||||||
"winget": "Microsoft.DotNet.DesktopRuntime.8"
|
"winget": "Microsoft.DotNet.DesktopRuntime.8"
|
||||||
},
|
},
|
||||||
|
"dotnet9": {
|
||||||
|
"category": "Microsoft Tools",
|
||||||
|
"choco": "dotnet-9.0-runtime",
|
||||||
|
"content": ".NET Desktop Runtime 9",
|
||||||
|
"description": ".NET Desktop Runtime 9 is a runtime environment required for running applications developed with .NET 9.",
|
||||||
|
"link": "https://dotnet.microsoft.com/download/dotnet/9.0",
|
||||||
|
"winget": "Microsoft.DotNet.DesktopRuntime.9"
|
||||||
|
},
|
||||||
"dmt": {
|
"dmt": {
|
||||||
"winget": "GNE.DualMonitorTools",
|
"winget": "GNE.DualMonitorTools",
|
||||||
"choco": "dual-monitor-tools",
|
"choco": "dual-monitor-tools",
|
||||||
|
@ -2682,26 +2682,17 @@
|
|||||||
"
|
"
|
||||||
$OneDrivePath = $($env:OneDrive)
|
$OneDrivePath = $($env:OneDrive)
|
||||||
Write-Host \"Removing OneDrive\"
|
Write-Host \"Removing OneDrive\"
|
||||||
|
|
||||||
# Check both traditional and Microsoft Store installations
|
|
||||||
$regPath = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OneDriveSetup.exe\"
|
$regPath = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OneDriveSetup.exe\"
|
||||||
$msStorePath = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Appx\\AppxAllUserStore\\Applications\\*OneDrive*\"
|
|
||||||
|
|
||||||
if (Test-Path $regPath) {
|
if (Test-Path $regPath) {
|
||||||
$OneDriveUninstallString = Get-ItemPropertyValue \"$regPath\" -Name \"UninstallString\"
|
$OneDriveUninstallString = Get-ItemPropertyValue \"$regPath\" -Name \"UninstallString\"
|
||||||
$OneDriveExe, $OneDriveArgs = $OneDriveUninstallString.Split(\" \")
|
$OneDriveExe, $OneDriveArgs = $OneDriveUninstallString.Split(\" \")
|
||||||
Start-Process -FilePath $OneDriveExe -ArgumentList \"$OneDriveArgs /silent\" -NoNewWindow -Wait
|
Start-Process -FilePath $OneDriveExe -ArgumentList \"$OneDriveArgs /silent\" -NoNewWindow -Wait
|
||||||
} elseif (Test-Path $msStorePath) {
|
|
||||||
Write-Host \"OneDrive appears to be installed via Microsoft Store\" -ForegroundColor Yellow
|
|
||||||
# Attempt to uninstall via winget
|
|
||||||
Start-Process -FilePath winget -ArgumentList \"uninstall -e --purge --accept-source-agreements Microsoft.OneDrive\" -NoNewWindow -Wait
|
|
||||||
} else {
|
} else {
|
||||||
Write-Host \"OneDrive doesn't seem to be installed\" -ForegroundColor Red
|
Write-Host \"Onedrive dosn't seem to be installed anymore\" -ForegroundColor Red
|
||||||
Write-Host \"Running cleanup if OneDrive path exists\" -ForegroundColor Red
|
return
|
||||||
}
|
}
|
||||||
|
# Check if OneDrive got Uninstalled
|
||||||
# Check if OneDrive got Uninstalled (both paths)
|
if (-not (Test-Path $regPath)) {
|
||||||
if (Test-Path $OneDrivePath) {
|
|
||||||
Write-Host \"Copy downloaded Files from the OneDrive Folder to Root UserProfile\"
|
Write-Host \"Copy downloaded Files from the OneDrive Folder to Root UserProfile\"
|
||||||
Start-Process -FilePath powershell -ArgumentList \"robocopy '$($OneDrivePath)' '$($env:USERPROFILE.TrimEnd())\\' /mov /e /xj\" -NoNewWindow -Wait
|
Start-Process -FilePath powershell -ArgumentList \"robocopy '$($OneDrivePath)' '$($env:USERPROFILE.TrimEnd())\\' /mov /e /xj\" -NoNewWindow -Wait
|
||||||
|
|
||||||
@ -2767,7 +2758,7 @@
|
|||||||
Write-Host \"If there are Files missing afterwards, please Login to Onedrive.com and Download them manually\" -ForegroundColor Yellow
|
Write-Host \"If there are Files missing afterwards, please Login to Onedrive.com and Download them manually\" -ForegroundColor Yellow
|
||||||
Start-Sleep 5
|
Start-Sleep 5
|
||||||
} else {
|
} else {
|
||||||
Write-Host \"Nothing to Cleanup with OneDrive\" -ForegroundColor Red
|
Write-Host \"Something went Wrong during the Unistallation of OneDrive\" -ForegroundColor Red
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user