This commit is contained in:
Mylloon 2024-04-08 17:54:06 +02:00
parent 4cc21f30a9
commit a80b7dd81e
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,13 +1,12 @@
@ECHO OFF @ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION SETLOCAL ENABLEDELAYEDEXPANSION
:: Executed as normal user
SET "repo=https://git.mylloon.fr/Anri/confOS/raw/branch/main" SET "repo=https://git.mylloon.fr/Anri/confOS/raw/branch/main"
SET "local=%HOMEPATH%\Documents\Local" SET "local=%HOMEPATH%\Documents\Local"
MKDIR "!local!" 2>NUL MKDIR "!local!" 2>NUL
:: === NO-ADMIN RIGHTS ==
fltmc >NUL 2>&1 || ( fltmc >NUL 2>&1 || (
:: Notice :: Notice
ECHO Please wait until the administrator popup appears ECHO Please wait until the administrator popup appears
@ -18,6 +17,7 @@ fltmc >NUL 2>&1 || (
"Add-AppPackage -ForceApplicationShutdown .\winget.msixbundle;" ^ "Add-AppPackage -ForceApplicationShutdown .\winget.msixbundle;" ^
"del .\winget.msixbundle" "del .\winget.msixbundle"
:: === Install Spotify == :: === Install Spotify ==
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/blockthespot.bat -OutFile '!local!\blockthespot.bat'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/blockthespot.bat -OutFile '!local!\blockthespot.bat'"
DEL "%APPDATA%\Spotify" DEL "%APPDATA%\Spotify"
@ -30,10 +30,11 @@ fltmc >NUL 2>&1 || (
) )
EXIT 0 EXIT 0
) )
:: Executed as admin user
:: === Register modifications == :: === ADMIN RIGHTS ==
ECHO Register entry...
:: === Registery modifications ==
ECHO Registery entries...
:: Right click of Windows 10 :: Right click of Windows 10
REG ADD "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve REG ADD "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
@ -78,6 +79,7 @@ REG ADD "HKCU\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWind
:: Disable checkboxes in explorer :: Disable checkboxes in explorer
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v AutoCheckSelect /t REG_DWORD /d 0 /f REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v AutoCheckSelect /t REG_DWORD /d 0 /f
:: === WinGet == :: === WinGet ==
:: Auto accept ToT :: Auto accept ToT
ECHO Y | winget list >NUL ECHO Y | winget list >NUL
@ -145,7 +147,8 @@ for %%i in (!games!) do (
!pmi! %%i !pmi! %%i
) )
:: Portable Winget packages shortcut :: === Ryujinx shortcut ==
:: Installed from winget as a portable app
PowerShell -Command "" ^ PowerShell -Command "" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^ "$WshShell = New-Object -comObject WScript.Shell;" ^
"$exe = (Get-ChildItem $env:LOCALAPPDATA\Microsoft\WinGet\Packages\Ryujinx.Ryujinx_Microsoft.Winget.*\publish\Ryujinx.exe).FullName;" ^ "$exe = (Get-ChildItem $env:LOCALAPPDATA\Microsoft\WinGet\Packages\Ryujinx.Ryujinx_Microsoft.Winget.*\publish\Ryujinx.exe).FullName;" ^
@ -153,23 +156,27 @@ PowerShell -Command "" ^
"$Shortcut.TargetPath = $exe;" ^ "$Shortcut.TargetPath = $exe;" ^
"$Shortcut.Save()" "$Shortcut.Save()"
:: === Install WSL == :: === Install WSL ==
ECHO WSL... ECHO WSL...
wsl --install --no-distribution wsl --install --no-distribution
:: === Modules ==
:: === Modules for Windows Update ==
PowerShell -Command "Install-PackageProvider -Name NuGet -Force" PowerShell -Command "Install-PackageProvider -Name NuGet -Force"
PowerShell -Command "Install-Module -Name PSWindowsUpdate -Force" PowerShell -Command "Install-Module -Name PSWindowsUpdate -Force"
:: === Download scripts ==
:: === Scripts from ./windows directory ==
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/ctmpf.bat -OutFile '!local!\ctmpf.bat'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/ctmpf.bat -OutFile '!local!\ctmpf.bat'"
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/update.bat -OutFile '!local!\update.bat'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/update.bat -OutFile '!local!\update.bat'"
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_nvidia_wsl.bat -OutFile '!local!\fix_nvidia_wsl.bat'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_nvidia_wsl.bat -OutFile '!local!\fix_nvidia_wsl.bat'"
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/vencord_installer.bat -OutFile '!local!\vencord_installer.bat'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/vencord_installer.bat -OutFile '!local!\vencord_installer.bat'"
:: PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_obs_shortcut.bat -OutFile '!local!\fix_obs_shortcut.bat'" :: PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_obs_shortcut.bat -OutFile '!local!\fix_obs_shortcut.bat'"
:: === Programs installation ==
:: Install W10Privacy :: === W10Privacy ==
:: TODO: Flagged as a virus by Defender
ECHO W10Privacy... ECHO W10Privacy...
PowerShell -Command "Invoke-WebRequest -Uri !repo!/W10Privacy.ini -OutFile '%HOMEPATH%\Downloads\W10Privacy.ini'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/W10Privacy.ini -OutFile '%HOMEPATH%\Downloads\W10Privacy.ini'"
ECHO Ensuite, utilise W10Privacy avec le fichier present dans %HOMEPATH%\Downloads. ECHO Ensuite, utilise W10Privacy avec le fichier present dans %HOMEPATH%\Downloads.
@ -199,7 +206,8 @@ PowerShell -Command "" ^
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\geek" /f /v DisplayName /t REG_SZ /d "Geek Uninstaller" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\geek" /f /v DisplayName /t REG_SZ /d "Geek Uninstaller"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\geek" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\Geek Uninstaller" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\geek" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\Geek Uninstaller"
:: Install LosslessCut
:: === LosslessCut ==
ECHO LosslessCut... ECHO LosslessCut...
PowerShell -Command "" ^ PowerShell -Command "" ^
"$archive = 'LosslessCut-win-x64.7z';" ^ "$archive = 'LosslessCut-win-x64.7z';" ^
@ -216,7 +224,8 @@ PowerShell -Command "" ^
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\LosslessCut" /f /v DisplayName /t REG_SZ /d "LosslessCut" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\LosslessCut" /f /v DisplayName /t REG_SZ /d "LosslessCut"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\LosslessCut" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\LosslessCut" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\LosslessCut" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\LosslessCut"
:: Install DSR
:: === DSR ==
ECHO DSR... ECHO DSR...
PowerShell -Command "" ^ 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';" ^
@ -235,11 +244,13 @@ PowerShell -Command "" ^
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\dsr" /f /v DisplayName /t REG_SZ /d "DSR" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\dsr" /f /v DisplayName /t REG_SZ /d "DSR"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\dsr" /f /v InstallLocation /t REG_SZ /d "%LOCALAPPDATA%\DSR" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\dsr" /f /v InstallLocation /t REG_SZ /d "%LOCALAPPDATA%\DSR"
:: Install Vencord
:: use local script :: === Vencord ==
:: Use arleady downloaded script
CMD /c "!local!\vencord_installer.bat" yes CMD /c "!local!\vencord_installer.bat" yes
:: Install OpenTabletDriver
:: === OpenTabletDriver ==
ECHO OpenTabletDriver... ECHO OpenTabletDriver...
PowerShell -Command "" ^ PowerShell -Command "" ^
"$archive = '%TEMP%\OpenTabletDriver.win-x64.zip';" ^ "$archive = '%TEMP%\OpenTabletDriver.win-x64.zip';" ^
@ -280,7 +291,9 @@ PowerShell -Command "" ^
"$Shortcut.WindowStyle = 7;" ^ "$Shortcut.WindowStyle = 7;" ^
"$Shortcut.Save()" "$Shortcut.Save()"
:: Install VALORANT rank yoinker
:: === VALORANT rank yoinker ==
:: TODO: Replaced by NOWT - as to be removed
:: ECHO VALORANT rank yoinker... :: ECHO VALORANT rank yoinker...
:: PowerShell -Command "" ^ :: PowerShell -Command "" ^
:: "$repo = 'zayKenyon/VALORANT-rank-yoinker';" ^ :: "$repo = 'zayKenyon/VALORANT-rank-yoinker';" ^
@ -302,7 +315,8 @@ PowerShell -Command "" ^
:: REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\vry" /f /v DisplayName /t REG_SZ /d "VALORANT-rank-yoinker" :: REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\vry" /f /v DisplayName /t REG_SZ /d "VALORANT-rank-yoinker"
:: REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\vry" /f /v InstallLocation /t REG_SZ /d "%LOCALAPPDATA%\VALORANT-rank-yoinker" :: REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\vry" /f /v InstallLocation /t REG_SZ /d "%LOCALAPPDATA%\VALORANT-rank-yoinker"
:: Install NOWT
:: === NOWT ==
ECHO NOWT... ECHO NOWT...
PowerShell -Command "" ^ PowerShell -Command "" ^
"$exe = 'NOWT-Installer.exe';" ^ "$exe = 'NOWT-Installer.exe';" ^
@ -312,7 +326,8 @@ PowerShell -Command "" ^
"Start-Process -Wait $file '/SUPPRESSMSGBOXES', '/VERYSILENT';" ^ "Start-Process -Wait $file '/SUPPRESSMSGBOXES', '/VERYSILENT';" ^
"Remove-Item -Force $file" "Remove-Item -Force $file"
:: Install Deceive
:: === Deceive ==
ECHO Deceive... ECHO Deceive...
MKDIR "%LOCALAPPDATA%\Deceive" 2>NUL MKDIR "%LOCALAPPDATA%\Deceive" 2>NUL
PowerShell -Command "" ^ PowerShell -Command "" ^
@ -327,7 +342,9 @@ PowerShell -Command "" ^
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v DisplayName /t REG_SZ /d "Deceive" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v DisplayName /t REG_SZ /d "Deceive"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v InstallLocation /t REG_SZ /d "%LOCALAPPDATA%\Deceive" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v InstallLocation /t REG_SZ /d "%LOCALAPPDATA%\Deceive"
:: :: Install Xournal++
:: TODO: ??
:: === Xournal++ ==
:: ECHO Xournal++... :: ECHO Xournal++...
:: PowerShell -Command "" ^ :: PowerShell -Command "" ^
:: "$repo = 'xournalpp/xournalpp';" ^ :: "$repo = 'xournalpp/xournalpp';" ^
@ -345,7 +362,13 @@ REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v
:: "Remove-Item -Force $outfile;" ^ :: "Remove-Item -Force $outfile;" ^
:: "Remove-Item -Force $exe" :: "Remove-Item -Force $exe"
:: Install Cubiomes viewer
:: === Minecraft ==
:: Rename shortcut for Minecraft
RENAME "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Prism Launcher.lnk" Minecraft.lnk
:: === Cubiomes viewer ==
ECHO Cubiomes viewer... ECHO Cubiomes viewer...
MKDIR "%LOCALAPPDATA%\cubiomes-viewer" 2>NUL MKDIR "%LOCALAPPDATA%\cubiomes-viewer" 2>NUL
PowerShell -Command "" ^ PowerShell -Command "" ^
@ -360,11 +383,9 @@ PowerShell -Command "" ^
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\cubiomes-viewer" /f /v DisplayName /t REG_SZ /d "cubiomes-viewer" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\cubiomes-viewer" /f /v DisplayName /t REG_SZ /d "cubiomes-viewer"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\cubiomes-viewer" /f /v InstallLocation /t REG_SZ /d "%LOCALAPPDATA%\cubiomes-viewer" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\cubiomes-viewer" /f /v InstallLocation /t REG_SZ /d "%LOCALAPPDATA%\cubiomes-viewer"
:: === Miscellaneous ==
:: Rename shortcut for Minecraft
RENAME "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Prism Launcher.lnk" Minecraft.lnk
:: Firefox configuration :: === Firefox configuration ==
:: Open and close Firefox for the first time, generating a profile
"%ProgramFiles%\Mozilla Firefox\firefox.exe" "%ProgramFiles%\Mozilla Firefox\firefox.exe"
TIMEOUT 5 TIMEOUT 5
TASKKILL /im firefox.exe /F TASKKILL /im firefox.exe /F
@ -373,17 +394,22 @@ 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 "Invoke-WebRequest -Uri !repo!/.mozilla/firefox/user.js -OutFile '!vbc!\user.js'"
:: Download addons settings in "Download" folder
PowerShell -Command "Invoke-WebRequest -Uri !repo!/.mozilla/firefox/extensions/SponsorBlockConfig.json -OutFile '%HOMEPATH%\Downloads\SponsorBlockConfig.json'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/.mozilla/firefox/extensions/SponsorBlockConfig.json -OutFile '%HOMEPATH%\Downloads\SponsorBlockConfig.json'"
PowerShell -Command "Invoke-WebRequest -Uri !repo!/.mozilla/firefox/extensions/auto-tab-discard-preferences.json -OutFile '%HOMEPATH%\Downloads\auto-tab-discard-preferences.json'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/.mozilla/firefox/extensions/auto-tab-discard-preferences.json -OutFile '%HOMEPATH%\Downloads\auto-tab-discard-preferences.json'"
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 Téléchargement (%HOMEPATH%\Downloads).
:: Setup WindowsAutoNightMode
:: === 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 "Invoke-WebRequest -Uri !repo!/.config/WindowsAutoNightMode/config.yaml -OutFile '%APPDATA%\AutoDarkMode\config.yaml'"
"%LOCALAPPDATA%\Programs\AutoDarkMode\adm-app\AutoDarkModeApp.exe" "%LOCALAPPDATA%\Programs\AutoDarkMode\adm-app\AutoDarkModeApp.exe"
:: :: Startup OBS replay buffer
:: === OBS ==
:: TODO: Replaced by NVidia Shadowplay
:: OBS replay buffer at startup
:: PowerShell -Command "$WshShell = New-Object -COM WScript.Shell;" ^ :: PowerShell -Command "$WshShell = New-Object -COM WScript.Shell;" ^
:: "$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\OBS.lnk');" ^ :: "$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\OBS.lnk');" ^
:: "$Shortcut.TargetPath = '%ProgramFiles%\obs-studio\bin\64bit\obs64.exe';" ^ :: "$Shortcut.TargetPath = '%ProgramFiles%\obs-studio\bin\64bit\obs64.exe';" ^
@ -404,6 +430,7 @@ ECHO https://www.blackmagicdesign.com/support/family/davinci-resolve-and-fusion
ECHO Installe les pilotes, pour connaitre la liste des pilotes, utilise UserDiag https://userdiag.com/download ECHO Installe les pilotes, pour connaitre la liste des pilotes, utilise UserDiag https://userdiag.com/download
ECHO Pour NVidia, utilise NVC et DDU ECHO Pour NVidia, utilise NVC et DDU
:: === End message == :: === End message ==
ECHO "" ECHO ""
ECHO Fais un tour des parametres Windows, apres avoir fait toutes les mises a jour disponible sur le PC. ECHO Fais un tour des parametres Windows, apres avoir fait toutes les mises a jour disponible sur le PC.