Created
March 21, 2025 20:32
-
-
Save daisyUniverse/5fc0d54be107427bd5f09146167cdf74 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Semi Manually """"UPDATE"""" Visual Studio Community 2022 on some specific computers | |
# This is fucked up | |
# Robin Universe [D] | |
# 03 . 21 . 25 | |
$coms = "C223_04","C223_05","A213_01" | |
foreach ($com in $coms){ | |
$s = New-PSSession $com | |
echo " [$com]`tSTART" | |
Invoke-Command -Session $s -ScriptBlock { | |
mkdir "C:\\temp\vs" | |
echo "Having the new installer in the old installers environment fucks it up enourmously, turns out. Putting it in it's own folder..." | |
Copy-Item "C:\\temp\Visual Studio Community 2022\vs_Community.exe" "C:\\temp\vs\" | |
if(Test-Path "C:\\Program Files (x86)\Microsoft Visual Studio\Installer\") { | |
echo "Make sure the old copy is as dead as I can manage" | |
Start-Process "C:\\Program Files (x86)\Microsoft Visual Studio\Installer\InstallCleanup.exe" -Wait | |
} else { echo "yea i think its gone..." } | |
echo "starting main install. beware this takes like.. 45 minutes..." | |
$t = Measure-Command { $r = Start-Process 'C:\\temp\vs\vs_community.exe' '--installPath "C:\\VS2022"', '--allworkloads', '--quiet', '--norestart' -Wait -PassThru } | |
echo $t | |
Write-Host "Returned $r" | |
} | |
echo " [$com]`tEND" | |
Remove-PSSession -Session $s | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment