# Remote path to the CSV file $csvUrl = "https://raw.githubusercontent.com/TheSiahxyz/THESIAH/main/static/winprogs.csv" # Local temporary path for the CSV $csvLocalPath = "C:\Temp\winprogs.csv" # Ensure the temp directory exists if (-Not (Test-Path "C:\Temp")) { New-Item -ItemType Directory -Path "C:\Temp" } # Download the CSV file Invoke-WebRequest -Uri $csvUrl -OutFile $csvLocalPath # Import the CSV and loop through each entry $softwareList = Import-Csv -Path $csvLocalPath -Header "Type", "URL", "Description" foreach ($software in $softwareList) { if ($software.Type -eq "R") { # Handle GitHub release (simple version: assume the latest release's .exe can be directly accessed via a predictable URL) $latestReleaseUrl = "$($software.URL)/releases/latest/download/" # Attempt to download from a constructed URL, assuming the repo uses this pattern $url = Invoke-WebRequest -Uri $latestReleaseUrl -UseBasicParsing | Select-Object -ExpandProperty Links | Where-Object { $_.href -like "*.exe" } | Select-Object -First 1 -ExpandProperty href } else { # Direct download link handling $url = $software.URL } $localPath = "C:\Temp\App_Setup.exe" # Download the installer if a URL was found if ($url -ne $null) { Invoke-WebRequest -Uri $url -OutFile $localPath # Install the application silently Start-Process -FilePath $localPath -Args "/S" -NoNewWindow -Wait # Remove the installer after installation Remove-Item -Path $localPath -Force # Output which software has been installed Write-Output "$($software.Description.trim()) has been installed successfully." } else { Write-Output "Failed to find download for $($software.Description.trim())." } } # Remove the CSV file after all installations Remove-Item -Path $csvLocalPath -Force # Arch WSL Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux TAG=$(curl --silent "https://api.github.com/repos/yuk7/ArchWSL/releases/latest"|grep '"tag_name"'|sed -E 's/.*"([^"]+)".*/\1/'|sed 's/v//') wget https://github.com/yuk7/ArchWSL/releases/download/$TAG/Arch.zip unzip Arch.zip cd Arch ./Arch.exe