Skip to content

Winget Repair Script - Location? #3875

Answered by marticliment
Harshmage asked this question in Q&A
Discussion options

You must be logged in to vote

The WinGet repair script is hardcoded into UniGetUI. this is the code that spawns the script:

using Process p = new Process
{
    StartInfo = new()
    {
        FileName = CoreData.PowerShell5,
        Arguments =
            "-ExecutionPolicy Bypass -NoLogo -NoProfile -Command \"& {" +
            "cmd.exe /C \"rmdir /Q /S `\"%temp%\\WinGet`\"\"; " +
           "cmd.exe /C \"`\"%localappdata%\\Microsoft\\WindowsApps\\winget.exe`\" source reset --force\"; " +
            "taskkill /im winget.exe /f; " +
            "taskkill /im WindowsPackageManagerServer.exe /f; " +
            "Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force; " +
            "Install-Module Micros…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Harshmage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants