vs2022-vm/oem/powershell-stuff.ps1

60 lines
2.4 KiB
PowerShell

cd C:\OEM
$VSInstallDir = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service"
if ($VSInstallDir) {
echo "installing asmdude vs2022 extension"
$asmdude_vsix = "$($env:TEMP)\AsmDude.vsix"
wget "https://github.com/HJLebbink/asm-dude/releases/download/v2.0.1.0/AsmDude2-vsix-2.0.1.0.vsix" -OutFile "$($asmdude_vsix)"
Start-Process -Filepath "$($VSInstallDir)\VSIXInstaller" -ArgumentList "/q /a $($asmdude_vsix)" -Wait
} else {
echo "vs2022 not installed. will not install asmdude"
}
# activate windows
echo "activating windows"
& ([ScriptBlock]::Create((irm https://get.activated.win))) /HWID
echo "downloading irvine"
$irvine_zip_dir = "$($env:TEMP)\Irvine.zip"
wget "https://github.com/surferkip/asmbook/raw/eecd4724e1f9ab1243a9c04c932fab5501fc93d6/Irvine.zip" -Outfile "$($irvine_zip_dir)"
Expand-Archive -Force "$($irvine_zip_dir)" C:\Irvine
mv C:\Irvine\Irvine\* C:\Irvine\
rm -Force -Recurse C:\Irvine\Irvine
echo "downloading project32"
$project32_zip_dir = "$($env:TEMP)\project32_vs2022.zip"
wget "https://github.com/surferkip/asmbook/raw/eecd4724e1f9ab1243a9c04c932fab5501fc93d6/Project32_VS2022.zip" -Outfile "$($project32_zip_dir)"
Expand-Archive -Force "$($project32_zip_dir)" "C:\Users\Docker\project32"
mv C:\Users\Docker\project32\Project32_VS2022\* C:\Users\Docker\project32\
rm -Force -Recurse C:\Users\Docker\project32\Project32_VS2022
echo "downloading project64"
$project64_zip_dir = "$($env:TEMP)\project64_vs2022.zip"
wget "https://github.com/surferkip/asmbook/raw/eecd4724e1f9ab1243a9c04c932fab5501fc93d6/Project64_VS2022.zip" -Outfile "$($project64_zip_dir)"
Expand-Archive -Force "$($project64_zip_dir)" "C:\Users\Docker\project64"
mv C:\Users\Docker\project64\Project64_VS2022\* C:\Users\Docker\project64\
rm -Force -Recurse C:\Users\Docker\project64\Project64_VS2022
# maybe this'll work -- no
# Set-ExecutionPolicy -ExecutionPolicy Bypass -Force
# Mount shared directory as a drive
New-PSDrive -Name "Z" -PSProvider "FileSystem" -Root "\\host.lan\Data" -Persist
# remove Widgets stuff
Get-AppxPackage *WebExperience* | Remove-AppxPackage
# remove animations -- https://superuser.com/a/1811743
Set-ItemProperty -Path "HKCU:Control Panel\Desktop" -Name UserPreferencesMask -Value ([byte[]](0x90,0x12,0x03,0x80,0x10,0x00,0x00,0x00))
# restart explorer
stop-process -name explorer -force