> ## Documentation Index
> Fetch the complete documentation index at: https://help.gorelo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 卸载 Gorelo Connect

> 使用 PowerShell 脚本从 Windows 干净卸载 Gorelo Connect 和 Gorelo Launcher，并附有警告，恢复访问需要重新安装。

此脚本将对 Gorelo Connect 和 Gorelo Launcher 执行干净卸载：

<Warning>
  如果已安装，这将**破坏 Gorelo Connect 插件**。重新安装 Gorelo Connect 插件以恢复对此特定资产的远程访问。
</Warning>

<Tabs>
  <Tab title="Windows">
    ```powershell theme={null}
    # Uninstall GoreloConnect
    $goreloConnectReg = Get-ChildItem -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall' | 
                        ForEach-Object { Get-ItemProperty $_.PSPath } | 
                        Where-Object { $_.DisplayName -like '*GoreloConnect*' }
                        
    if ($goreloConnectReg.UninstallString) {
        Start-Process "cmd.exe" -ArgumentList "/c $($goreloConnectReg.UninstallString) /S -Force" -Wait -NoNewWindow
    }

    # Get all user profiles
    $userProfiles = Get-ChildItem "C:\Users" -Directory

    # Remove GoreloConnect and GoreloLauncher components for all users
    foreach ($profile in $userProfiles) {
        # Remove GoreloConnect components
        Remove-Item "C:\Users\$($profile.Name)\AppData\Roaming\GoreloConnect" -Recurse -Force -ErrorAction SilentlyContinue
        
        # Remove GoreloLauncher components
        Remove-Item "C:\Users\$($profile.Name)\Downloads\GoreloLauncher.exe" -Force -ErrorAction SilentlyContinue
        Remove-Item "C:\Users\$($profile.Name)\AppData\Local\GoreloLauncher\config.dat" -Force -ErrorAction SilentlyContinue
        Remove-Item "C:\Users\$($profile.Name)\AppData\Local\GoreloLauncher" -Recurse -Force -ErrorAction SilentlyContinue
    }

    # Remove global GoreloLauncher components
    Remove-Item "Registry::HKEY_CLASSES_ROOT\GoreloLauncher" -Recurse -Force -ErrorAction SilentlyContinue
    Remove-Item "C:\Program Files\GoreloLauncher" -Recurse -Force -ErrorAction SilentlyContinue
    Remove-Item "C:\ProgramData\GoreloLauncher" -Recurse -Force -ErrorAction SilentlyContinue

    # NOTE! This will break the Gorelo Connect plugin if installed. Reinstall the Gorelo Connect plugin to restore remote access to this specific asset.  
    ```
  </Tab>

  <Tab title="macOS">
    ```shellscript theme={null}
    APP_NAME="GoreloLauncher"
    DMG_NAME="$APP_NAME.dmg"
    APP_DIR="$APP_NAME.app"
    APP_FOLDER="$APP_NAME"
    DOWNLOADS_DIR="$HOME/Downloads"
    APPLICATIONS_DIR="/Applications"
    echo "Starting cleanup for $APP_NAME ..."
    if [ -f "$DOWNLOADS_DIR/$DMG_NAME" ]; then
       echo "Deleting $DOWNLOADS_DIR/$DMG_NAME"
       rm -f "$DOWNLOADS_DIR/$DMG_NAME"
    else
       echo "No DMG found: $DOWNLOADS_DIR/$DMG_NAME"
    fi
    if [ -d "$APPLICATIONS_DIR/$APP_DIR" ]; then
       echo "Deleting $APPLICATIONS_DIR/$APP_DIR"
       rm -rf "$APPLICATIONS_DIR/$APP_DIR"
    else
       echo "No .app found: $APPLICATIONS_DIR/$APP_DIR"
    fi
    if [ -d "$APPLICATIONS_DIR/$APP_FOLDER" ]; then
       echo "Deleting $APPLICATIONS_DIR/$APP_FOLDER"
       rm -rf "$APPLICATIONS_DIR/$APP_FOLDER"
    else
       echo "No folder found: $APPLICATIONS_DIR/$APP_FOLDER"
    fi
    echo "GoreloConnect uninstallation complete"
    ```
  </Tab>
</Tabs>

<Info>
  如果已安装，这将破坏 Gorelo Connect 插件。重新安装 Gorelo Connect 插件以恢复对此特定资产的远程访问。
</Info>
