Last active
April 8, 2024 14:08
-
-
Save trumad/0196c04a0246727fc2413dabe3484da0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a temporary directory if it doesn't exist | |
$tempDirectory = "C:\Temp" | |
if (-not (Test-Path $tempDirectory -PathType Container)) { | |
New-Item -ItemType Directory -Path $tempDirectory -Force | |
} | |
# Step 0: Backup Arc: | |
Write-Host "Backing up arc..." | |
& "C:\Program Files\7-Zip\7z.exe" a -t7z "c:\Temp\arcBackup.7z" "c:\arcBrowser\*" -mx=4 | |
Write-Host "...Done" | |
# Step 1: Download the .appinstaller file | |
$appInstallerUrl = "https://releases.arc.net/windows/prod/Arc.appinstaller" | |
$appInstallerPath = "C:\Temp\Arc.appinstaller" | |
Invoke-WebRequest -Uri $appInstallerUrl -OutFile $appInstallerPath | |
# Step 2: Parse the .appinstaller file to get the MSIX download URI | |
[xml]$appInstallerXml = Get-Content $appInstallerPath | |
$msixDownloadUri = $appInstallerXml.AppInstaller.MainPackage.Uri | |
# Step 3: Download the MSIX file | |
$msixPath = "C:\Temp\Arc.x64.msix" | |
Invoke-WebRequest -Uri $msixDownloadUri -OutFile $msixPath | |
& "C:\Program Files\7-Zip\7z.exe" x "C:\Temp\Arc.x64.msix" -o"c:\arcBrowser" -y | |
# Cleanup: Remove temporary files | |
Remove-Item $appInstallerPath | |
Remove-Item $msixPath | |
Write-Host "Arc Browser has been downloaded and extracted to $extractPath" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not with this script, and all the old versions are gone or at least not easily accessible by now.
But if you wanted to be a hero and save all future versions, you could write a cronjob or run a script on a timer. You would need to hit up "https://releases.arc.net/windows/prod/Arc.appinstaller" at least once a day to get the downloadURI from the xml file. You'd have to then download each new version. And maybe upload them to the internet archive or somewhere that other people can access them.