use Start-BitsTransfer instead of Invoke-WebRequest
This commit is contained in:
parent
5b289f1a28
commit
36c0698af8
1 changed files with 25 additions and 25 deletions
|
@ -13,7 +13,7 @@ fltmc >NUL 2>&1 || (
|
||||||
ECHO Please wait until the administrator popup appears
|
ECHO Please wait until the administrator popup appears
|
||||||
|
|
||||||
:: === Install Spotify ==
|
:: === Install Spotify ==
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/blockthespot.bat -OutFile '!local!\blockthespot.bat'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/windows/blockthespot.bat -Destination '!local!'"
|
||||||
DEL "%APPDATA%\Spotify"
|
DEL "%APPDATA%\Spotify"
|
||||||
ECHO Y| CMD /c "!local!\blockthespot.bat" yes
|
ECHO Y| CMD /c "!local!\blockthespot.bat" yes
|
||||||
PowerShell -Command "Stop-Process -Name Spotify -ErrorAction SilentlyContinue"
|
PowerShell -Command "Stop-Process -Name Spotify -ErrorAction SilentlyContinue"
|
||||||
|
@ -145,20 +145,20 @@ PowerShell -Command "Install-PackageProvider -Name NuGet -Force"
|
||||||
PowerShell -Command "Install-Module -Name PSWindowsUpdate -Force"
|
PowerShell -Command "Install-Module -Name PSWindowsUpdate -Force"
|
||||||
|
|
||||||
:: === Download scripts ==
|
:: === Download scripts ==
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/ctmpf.bat -OutFile '!local!\ctmpf.bat'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/windows/ctmpf.bat -Destination '!local!'"
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/update.bat -OutFile '!local!\update.bat'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/windows/update.bat -Destination '!local!'"
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_nvidia_wsl.bat -OutFile '!local!\fix_nvidia_wsl.bat'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/windows/fix_nvidia_wsl.bat -Destination '!local!'"
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/vencord_installer.bat -OutFile '!local!\vencord_installer.bat'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/windows/vencord_installer.bat -Destination '!local!'"
|
||||||
:: PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_obs_shortcut.bat -OutFile '!local!\fix_obs_shortcut.bat'"
|
:: PowerShell -Command "Start-BitsTransfer -Source !repo!/windows/fix_obs_shortcut.bat -Destination '!local!'"
|
||||||
|
|
||||||
:: === Programs installation ==
|
:: === Programs installation ==
|
||||||
:: Install W10Privacy
|
:: Install W10Privacy
|
||||||
ECHO W10Privacy...
|
ECHO W10Privacy...
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/W10Privacy.ini -OutFile '%HOMEPATH%\Downloads\W10Privacy.ini'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/W10Privacy.ini -Destination '%HOMEPATH%\Downloads'"
|
||||||
ECHO Ensuite, utilise W10Privacy avec le fichier present dans %HOMEPATH%\Downloads.
|
ECHO Ensuite, utilise W10Privacy avec le fichier present dans %HOMEPATH%\Downloads.
|
||||||
PowerShell -Command "" ^
|
PowerShell -Command "" ^
|
||||||
"$archive = '%TEMP%\W10Privacy.zip';" ^
|
"$archive = '%TEMP%\W10Privacy.zip';" ^
|
||||||
"Invoke-WebRequest -Uri https://www.w10privacy.de/app/download/12302828636/W10Privacy.zip -OutFile $archive;" ^
|
"Start-BitsTransfer -Source https://www.w10privacy.de/app/download/12302828636/W10Privacy.zip -Destination $archive;" ^
|
||||||
"Expand-Archive -Path $archive -DestinationPath $env:TEMP -Force;" ^
|
"Expand-Archive -Path $archive -DestinationPath $env:TEMP -Force;" ^
|
||||||
"$file = $env:TEMP + '\\' + (Get-ChildItem $env:TEMP\W10Privacy*.exe).BaseName + '.exe';" ^
|
"$file = $env:TEMP + '\\' + (Get-ChildItem $env:TEMP\W10Privacy*.exe).BaseName + '.exe';" ^
|
||||||
"Start-Process $file /S -NoNewWindow -Wait -PassThru;" ^
|
"Start-Process $file /S -NoNewWindow -Wait -PassThru;" ^
|
||||||
|
@ -171,7 +171,7 @@ PowerShell -Command "" ^
|
||||||
ECHO Geek Uninstaller...
|
ECHO Geek Uninstaller...
|
||||||
PowerShell -Command "" ^
|
PowerShell -Command "" ^
|
||||||
"$archive = '%TEMP%\geek.zip';" ^
|
"$archive = '%TEMP%\geek.zip';" ^
|
||||||
"Invoke-WebRequest -Uri https://geekuninstaller.com/geek.zip -OutFile $archive;" ^
|
"Start-BitsTransfer -Source https://geekuninstaller.com/geek.zip -Destination $archive;" ^
|
||||||
"Expand-Archive -Path $archive -DestinationPath '%ProgramFiles%\Geek Uninstaller' -Force;" ^
|
"Expand-Archive -Path $archive -DestinationPath '%ProgramFiles%\Geek Uninstaller' -Force;" ^
|
||||||
"$WshShell = New-Object -comObject WScript.Shell;" ^
|
"$WshShell = New-Object -comObject WScript.Shell;" ^
|
||||||
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Geek Uninstaller.lnk');" ^
|
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Geek Uninstaller.lnk');" ^
|
||||||
|
@ -186,7 +186,7 @@ PowerShell -Command "" ^
|
||||||
"$archive = 'LosslessCut-win-x64.7z';" ^
|
"$archive = 'LosslessCut-win-x64.7z';" ^
|
||||||
"$link = 'https://github.com/mifi/lossless-cut/releases/latest/download/' + $archive;" ^
|
"$link = 'https://github.com/mifi/lossless-cut/releases/latest/download/' + $archive;" ^
|
||||||
"$outfile = Join-Path -Path $env:TEMP -ChildPath $archive;" ^
|
"$outfile = Join-Path -Path $env:TEMP -ChildPath $archive;" ^
|
||||||
"Invoke-WebRequest -Uri $link -OutFile $outfile;" ^
|
"Start-BitsTransfer -Source $link -Destination $outfile;" ^
|
||||||
"cd $env:TEMP;" ^
|
"cd $env:TEMP;" ^
|
||||||
"& $env:ProgramFiles\7-Zip\7z.exe x $archive -o'%ProgramFiles%\LosslessCut' -y;" ^
|
"& $env:ProgramFiles\7-Zip\7z.exe x $archive -o'%ProgramFiles%\LosslessCut' -y;" ^
|
||||||
"$WshShell = New-Object -comObject WScript.Shell;" ^
|
"$WshShell = New-Object -comObject WScript.Shell;" ^
|
||||||
|
@ -202,7 +202,7 @@ PowerShell -Command "" ^
|
||||||
"$releases = 'https://git.mylloon.fr/api/v1/repos/Anri/dsr/releases/latest';" ^
|
"$releases = 'https://git.mylloon.fr/api/v1/repos/Anri/dsr/releases/latest';" ^
|
||||||
"$link = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url;" ^
|
"$link = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url;" ^
|
||||||
"$archive = '%TEMP%\dsr.zip';" ^
|
"$archive = '%TEMP%\dsr.zip';" ^
|
||||||
"Invoke-WebRequest -Uri $link -OutFile $archive;" ^
|
"Start-BitsTransfer -Source $link -Destination $archive;" ^
|
||||||
"Remove-Item '%LOCALAPPDATA%\DSR' -Recurse -ErrorAction SilentlyContinue;" ^
|
"Remove-Item '%LOCALAPPDATA%\DSR' -Recurse -ErrorAction SilentlyContinue;" ^
|
||||||
"Expand-Archive -Path $archive -DestinationPath '%LOCALAPPDATA%\DSR' -Force;" ^
|
"Expand-Archive -Path $archive -DestinationPath '%LOCALAPPDATA%\DSR' -Force;" ^
|
||||||
"Move-Item -Path '%LOCALAPPDATA%\DSR\dsr-win32-x64\*' -Destination '%LOCALAPPDATA%\DSR' -Force;" ^
|
"Move-Item -Path '%LOCALAPPDATA%\DSR\dsr-win32-x64\*' -Destination '%LOCALAPPDATA%\DSR' -Force;" ^
|
||||||
|
@ -221,7 +221,7 @@ CMD /c "!local!\vencord_installer.bat" yes
|
||||||
:: Install OpenTabletDriver
|
:: Install OpenTabletDriver
|
||||||
ECHO OpenTabletDriver...
|
ECHO OpenTabletDriver...
|
||||||
PowerShell -Command "" ^
|
PowerShell -Command "" ^
|
||||||
"Invoke-WebRequest -Uri https://opentabletdriver.net/Release/Download/OpenTabletDriver.win-x64.zip -OutFile '%TEMP%\OpenTabletDriver.win-x64.zip';" ^
|
"Start-BitsTransfer -Source https://opentabletdriver.net/Release/Download/OpenTabletDriver.win-x64.zip -Destination '%TEMP%\OpenTabletDriver.win-x64.zip';" ^
|
||||||
"Expand-Archive -Path '%TEMP%\OpenTabletDriver.win-x64.zip' -DestinationPath '%ProgramFiles%\OpenTabletDriver' -Force;" ^
|
"Expand-Archive -Path '%TEMP%\OpenTabletDriver.win-x64.zip' -DestinationPath '%ProgramFiles%\OpenTabletDriver' -Force;" ^
|
||||||
"$WshShell = New-Object -comObject WScript.Shell;" ^
|
"$WshShell = New-Object -comObject WScript.Shell;" ^
|
||||||
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\OpenTabletDriver.lnk');" ^
|
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\OpenTabletDriver.lnk');" ^
|
||||||
|
@ -233,16 +233,16 @@ REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTabletDriv
|
||||||
|
|
||||||
:: WindowsInk for OpenTabletDriver
|
:: WindowsInk for OpenTabletDriver
|
||||||
ECHO WindowsInk support for OpenTabletDriver...
|
ECHO WindowsInk support for OpenTabletDriver...
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri https://github.com/X9VoiD/vmulti-bin/releases/download/v1.0/VMulti.Driver.zip -OutFile '%TEMP%\VMulti-Driver.zip'"
|
PowerShell -Command "Start-BitsTransfer -Source https://github.com/X9VoiD/vmulti-bin/releases/download/v1.0/VMulti.Driver.zip -Destination '%TEMP%\VMulti-Driver.zip'"
|
||||||
PowerShell -Command "Expand-Archive -Path '%TEMP%\VMulti-Driver.zip' -DestinationPath '%TEMP%\VMulti-Driver' -Force"
|
PowerShell -Command "Expand-Archive -Path '%TEMP%\VMulti-Driver.zip' -DestinationPath '%TEMP%\VMulti-Driver' -Force"
|
||||||
CALL "%TEMP%\VMulti-Driver\install_hiddriver.bat"
|
CALL "%TEMP%\VMulti-Driver\install_hiddriver.bat"
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri https://github.com/X9VoiD/VoiDPlugins/releases/latest/download/WindowsInk.zip -OutFile '%TEMP%\WindowsInk.zip'"
|
PowerShell -Command "Start-BitsTransfer -Source https://github.com/X9VoiD/VoiDPlugins/releases/latest/download/WindowsInk.zip -Destination '%TEMP%\WindowsInk.zip'"
|
||||||
PowerShell -Command "Expand-Archive -Path '%TEMP%\WindowsInk.zip' -DestinationPath '%LOCALAPPDATA%\OpenTabletDriver\Plugins\Windows Ink' -Force"
|
PowerShell -Command "Expand-Archive -Path '%TEMP%\WindowsInk.zip' -DestinationPath '%LOCALAPPDATA%\OpenTabletDriver\Plugins\Windows Ink' -Force"
|
||||||
|
|
||||||
:: Presets of OpenTabletDriver
|
:: Presets of OpenTabletDriver
|
||||||
ECHO Downloading OpenTabletDriver presets...
|
ECHO Downloading OpenTabletDriver presets...
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/opentabletdriver/vertical-main.json -OutFile '%LOCALAPPDATA%\OpenTabletDriver\Presets\vertical-main.json'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/opentabletdriver/vertical-main.json -Destination '%LOCALAPPDATA%\OpenTabletDriver\Presets'"
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/opentabletdriver/vertical-second.json -OutFile '%LOCALAPPDATA%\OpenTabletDriver\Presets\vertical-second.json'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/opentabletdriver/vertical-second.json -Destination '%LOCALAPPDATA%\OpenTabletDriver\Presets'"
|
||||||
|
|
||||||
:: Settings of OpenTabletDriver, using 'vertical-main.json' as default settings
|
:: Settings of OpenTabletDriver, using 'vertical-main.json' as default settings
|
||||||
ECHO Setting up OpenTabletDriver...
|
ECHO Setting up OpenTabletDriver...
|
||||||
|
@ -258,7 +258,7 @@ PowerShell -Command "" ^
|
||||||
"$link = \"https://github.com/$repo/releases/download/$tag/$file\";" ^
|
"$link = \"https://github.com/$repo/releases/download/$tag/$file\";" ^
|
||||||
"$archive = 'vry.zip';" ^
|
"$archive = 'vry.zip';" ^
|
||||||
"$outfile = Join-Path -Path $env:TEMP -ChildPath $archive;" ^
|
"$outfile = Join-Path -Path $env:TEMP -ChildPath $archive;" ^
|
||||||
"Invoke-WebRequest -Uri $link -OutFile $outfile;" ^
|
"Start-BitsTransfer -Source $link -Destination $outfile;" ^
|
||||||
"cd $env:TEMP;" ^
|
"cd $env:TEMP;" ^
|
||||||
"Expand-Archive -Path $archive -DestinationPath '%LOCALAPPDATA%\VALORANT-rank-yoinker' -Force;" ^
|
"Expand-Archive -Path $archive -DestinationPath '%LOCALAPPDATA%\VALORANT-rank-yoinker' -Force;" ^
|
||||||
"$WshShell = New-Object -comObject WScript.Shell;" ^
|
"$WshShell = New-Object -comObject WScript.Shell;" ^
|
||||||
|
@ -276,7 +276,7 @@ PowerShell -Command "" ^
|
||||||
"$exe = 'Deceive.exe';" ^
|
"$exe = 'Deceive.exe';" ^
|
||||||
"$link = 'https://github.com/molenzwiebel/Deceive/releases/latest/download/' + $exe;" ^
|
"$link = 'https://github.com/molenzwiebel/Deceive/releases/latest/download/' + $exe;" ^
|
||||||
"$outfile = Join-Path -Path '%ProgramFiles%\Deceive' -ChildPath $exe;" ^
|
"$outfile = Join-Path -Path '%ProgramFiles%\Deceive' -ChildPath $exe;" ^
|
||||||
"Invoke-WebRequest -Uri $link -OutFile $outfile;" ^
|
"Start-BitsTransfer -Source $link -Destination $outfile;" ^
|
||||||
"$WshShell = New-Object -comObject WScript.Shell;" ^
|
"$WshShell = New-Object -comObject WScript.Shell;" ^
|
||||||
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Deceive.lnk');" ^
|
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Deceive.lnk');" ^
|
||||||
"$Shortcut.TargetPath = \"%ProgramFiles%\Deceive\$exe\";" ^
|
"$Shortcut.TargetPath = \"%ProgramFiles%\Deceive\$exe\";" ^
|
||||||
|
@ -294,7 +294,7 @@ REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v
|
||||||
:: "$link = \"https://github.com/$repo/releases/download/$tag/$file\";" ^
|
:: "$link = \"https://github.com/$repo/releases/download/$tag/$file\";" ^
|
||||||
:: "$archive = 'topgrade.zip';" ^
|
:: "$archive = 'topgrade.zip';" ^
|
||||||
:: "$outfile = Join-Path -Path $env:TEMP -ChildPath $archive;" ^
|
:: "$outfile = Join-Path -Path $env:TEMP -ChildPath $archive;" ^
|
||||||
:: "Invoke-WebRequest -Uri $link -OutFile $outfile;" ^
|
:: "Start-BitsTransfer -Source $link -Destination $outfile;" ^
|
||||||
:: "cd $env:TEMP;" ^
|
:: "cd $env:TEMP;" ^
|
||||||
:: "Expand-Archive -Path $archive -DestinationPath '%ProgramFiles%\Topgrade' -Force"
|
:: "Expand-Archive -Path $archive -DestinationPath '%ProgramFiles%\Topgrade' -Force"
|
||||||
:: REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Topgrade" /f /v DisplayName /t REG_SZ /d "Topgrade"
|
:: REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Topgrade" /f /v DisplayName /t REG_SZ /d "Topgrade"
|
||||||
|
@ -310,7 +310,7 @@ REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v
|
||||||
:: "$link = \"https://github.com/$repo/releases/download/$tag/$file\";" ^
|
:: "$link = \"https://github.com/$repo/releases/download/$tag/$file\";" ^
|
||||||
:: "$archive = 'xournalpp.zip';" ^
|
:: "$archive = 'xournalpp.zip';" ^
|
||||||
:: "$outfile = Join-Path -Path $env:TEMP -ChildPath $archive;" ^
|
:: "$outfile = Join-Path -Path $env:TEMP -ChildPath $archive;" ^
|
||||||
:: "Invoke-WebRequest -Uri $link -OutFile $outfile;" ^
|
:: "Start-BitsTransfer -Source $link -Destination $outfile;" ^
|
||||||
:: "cd $env:TEMP;" ^
|
:: "cd $env:TEMP;" ^
|
||||||
:: "Expand-Archive -Path $archive -DestinationPath $env:TEMP -Force;" ^
|
:: "Expand-Archive -Path $archive -DestinationPath $env:TEMP -Force;" ^
|
||||||
:: "$exe = $env:TEMP + '\' + $file.Substring(0, $file.Length - 3) + 'exe';" ^
|
:: "$exe = $env:TEMP + '\' + $file.Substring(0, $file.Length - 3) + 'exe';" ^
|
||||||
|
@ -327,17 +327,17 @@ TASKKILL /im firefox.exe /F
|
||||||
|
|
||||||
ECHO Firefox configuration...
|
ECHO Firefox configuration...
|
||||||
FOR /F %%i IN ('dir /B /S ^"%APPDATA%\Mozilla\Firefox\Profiles\*.default-release^"') DO SET "vbc=%%i"
|
FOR /F %%i IN ('dir /B /S ^"%APPDATA%\Mozilla\Firefox\Profiles\*.default-release^"') DO SET "vbc=%%i"
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/.mozilla/firefox/user.js -OutFile '!vbc!\user.js'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/.mozilla/firefox/user.js -Destination '!vbc!'"
|
||||||
|
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/.mozilla/firefox/extensions/Dark-Reader-Settings.json -OutFile '%HOMEPATH%\Downloads\Dark-Reader-Settings.json'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/.mozilla/firefox/extensions/Dark-Reader-Settings.json -Destination '%HOMEPATH%\Downloads'"
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/.mozilla/firefox/extensions/SponsorBlockConfig.json -OutFile '%HOMEPATH%\Downloads\SponsorBlockConfig.json'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/.mozilla/firefox/extensions/SponsorBlockConfig.json -Destination '%HOMEPATH%\Downloads'"
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/.mozilla/firefox/extensions/auto-tab-discard-preferences.json -OutFile '%HOMEPATH%\Downloads\auto-tab-discard-preferences.json'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/.mozilla/firefox/extensions/auto-tab-discard-preferences.json -Destination '%HOMEPATH%\Downloads'"
|
||||||
ECHO La configuration des differents Addons de Firefox est presente dans le dossier %HOMEPATH%\Downloads.
|
ECHO La configuration des differents Addons de Firefox est presente dans le dossier %HOMEPATH%\Downloads.
|
||||||
|
|
||||||
:: Setup WindowsAutoNightMode
|
:: Setup WindowsAutoNightMode
|
||||||
ECHO WindowsAutoNightMode configuration...
|
ECHO WindowsAutoNightMode configuration...
|
||||||
MKDIR "%APPDATA%\AutoDarkMode" 2>NUL
|
MKDIR "%APPDATA%\AutoDarkMode" 2>NUL
|
||||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/.config/WindowsAutoNightMode/config.yaml -OutFile '%APPDATA%\AutoDarkMode\config.yaml'"
|
PowerShell -Command "Start-BitsTransfer -Source !repo!/.config/WindowsAutoNightMode/config.yaml -Destination '%APPDATA%\AutoDarkMode'"
|
||||||
"%LOCALAPPDATA%\Programs\AutoDarkMode\adm-app\AutoDarkModeApp.exe"
|
"%LOCALAPPDATA%\Programs\AutoDarkMode\adm-app\AutoDarkModeApp.exe"
|
||||||
|
|
||||||
:: :: Startup OBS replay buffer
|
:: :: Startup OBS replay buffer
|
||||||
|
|
Loading…
Reference in a new issue