confOS/windows11.bat

149 lines
7.7 KiB
Batchfile
Raw Normal View History

2022-12-24 16:25:14 +01:00
@echo off
2022-09-30 03:33:13 +02:00
:: Start as administrator
fltmc >nul 2>&1 || (
2022-12-24 16:25:14 +01:00
powershell Start -Verb RunAs '%0' 2> nul || (
2022-12-12 00:10:20 +01:00
exit 1
2022-09-30 03:33:13 +02:00
)
exit 0
)
2022-10-17 21:16:25 +02:00
:: === Right click of Windows 10 ==
2022-12-24 16:25:14 +01:00
reg ADD "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
2022-09-30 03:33:13 +02:00
2022-10-17 21:16:25 +02:00
:: === Disabling the gamebar ==
2022-12-24 16:25:14 +01:00
reg ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v AppCaptureEnabled /t REG_DWORD /d 00000000 /f
reg ADD "HKEY_CURRENT_USER\System\GameConfigStore" /v GameDVR_Enabled /t REG_DWORD /d 00000000 /f
2022-09-30 03:33:13 +02:00
2022-10-17 21:16:25 +02:00
:: === Disabling widgets ==
2022-12-24 16:25:14 +01:00
reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 00000000 /f
2022-09-30 03:33:13 +02:00
2022-10-17 21:16:25 +02:00
:: === Disabling hibernation ==
2022-12-24 16:25:14 +01:00
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 00000000 /f
2022-09-30 03:33:13 +02:00
powercfg /H off
2022-10-17 21:16:25 +02:00
:: === Disabling the SysMain service ==
2022-09-30 03:33:13 +02:00
sc stop "SysMain" & sc config "SysMain" start=disabled
2022-10-17 21:16:25 +02:00
:: === Added confirmation when trashing ==
2022-12-24 16:25:14 +01:00
reg ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v ConfirmFileDelete /t REG_DWORD /d 00000001 /f
2022-09-30 03:33:13 +02:00
2022-10-17 21:16:25 +02:00
:: === Don't create a Zone:Identify ==
2022-12-24 16:25:14 +01:00
reg ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v SaveZoneInformation /t REG_DWORD /d 00000001 /f
2022-09-30 03:33:13 +02:00
2022-10-17 21:16:25 +02:00
:: === Disables memory integrity ==
:: see https://support.microsoft.com/en-us/windows/options-to-optimize-gaming-performance-in-windows-11-a255f612-2949-4373-a566-ff6f3f474613
2022-12-24 16:25:14 +01:00
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v Enabled /t REG_DWORD /d 00000000 /f
2022-12-21 00:54:54 +01:00
:: === Disables sticky keys ==
2022-12-24 16:25:14 +01:00
reg ADD "HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 506 /f
2022-12-21 00:54:54 +01:00
2022-10-17 21:16:25 +02:00
:: === Application downloads ==
:: Auto accept ToT
2022-10-17 20:17:27 +02:00
echo Y | winget list >nul
2022-10-22 21:16:47 +02:00
winget install -he Mozilla.Firefox
winget install -he 7zip.7zip
winget install -he Discord.Discord
winget install -he Valve.Steam
winget install -he voidtools.Everything.Lite
winget install -he VideoLAN.VLC
winget install -he File-New-Project.EarTrumpet
winget install -he EclipseAdoptium.Temurin.17.JDK
winget install -he Microsoft.VisualStudioCode
winget install -he GIMP.GIMP
winget install -he DuongDieuPhap.ImageGlass
winget install -he ONLYOFFICE.DesktopEditors
winget install -he PrismLauncher.PrismLauncher
winget install -he RiotGames.LeagueOfLegends.EUW
winget install -he RiotGames.Valorant.EU
winget install -he OBSProject.OBSStudio
winget install -he Parsec.Parsec
winget install -he Microsoft.PowerToys
winget install -he OpenWhisperSystems.Signal
winget install -he HandBrake.HandBrake
winget install -he Front.scrcpy+
winget install -he Obsidian.Obsidian
winget install -he KDE.KDEConnect
winget install -he HeroicGamesLauncher.HeroicGamesLauncher
winget install -he Microsoft.PowerShell
2022-12-11 12:05:46 +01:00
winget install -he Eassos.DiskGenius
2022-09-30 03:33:13 +02:00
2022-11-06 23:20:30 +01:00
:: === C++ Libraries ==
winget install -he Microsoft.VCRedist.2005.x86
winget install -he Microsoft.VCRedist.2005.x64
winget install -he Microsoft.VCRedist.2008.x86
winget install -he Microsoft.VCRedist.2008.x64
winget install -he Microsoft.VCRedist.2010.x86
winget install -he Microsoft.VCRedist.2010.x64
winget install -he Microsoft.VCRedist.2012.x86
winget install -he Microsoft.VCRedist.2012.x64
winget install -he Microsoft.VCRedist.2013.x86
winget install -he Microsoft.VCRedist.2013.x64
winget install -he Microsoft.VCRedist.2015+.x86
winget install -he Microsoft.VCRedist.2015+.x64
:: Install WSL
2022-09-30 03:33:13 +02:00
wsl --install
:: Install Spotify
2022-10-17 20:51:06 +02:00
powershell -Command "&{[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}; """"& { $((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content)} -confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_on -cache_on -block_update_off"""" | Invoke-Expression"
2022-09-30 12:45:41 +02:00
2022-10-17 21:16:25 +02:00
:: === Firefox configuration ==
2023-01-04 11:44:51 +01:00
"%ProgramFiles%\Mozilla Firefox\firefox.exe"
taskkill /im firefox.exe /F
2022-10-17 20:50:34 +02:00
for /F %%i in ('dir /B /S ^"%APPDATA%\Mozilla\Firefox\Profiles\*.default-release^"') do set vbc=%%i
2023-01-04 12:36:17 +01:00
powershell -Command "Invoke-WebRequest -Uri https://git.kennel.ml/Anri/confOS/raw/branch/main/.mozilla/firefox/user.js -OutFile '%vbc%/user.js'"
2022-10-17 20:50:34 +02:00
2023-01-04 12:36:17 +01:00
powershell -Command "Invoke-WebRequest -Uri https://git.kennel.ml/Anri/confOS/raw/branch/main/.mozilla/firefox/extensions/Dark-Reader-Settings.json -OutFile '%HOMEPATH%\Downloads\Dark-Reader-Settings.json'"
powershell -Command "Invoke-WebRequest -Uri https://git.kennel.ml/Anri/confOS/raw/branch/main/.mozilla/firefox/extensions/SponsorBlockConfig.json -OutFile '%HOMEPATH%\Downloads\SponsorBlockConfig.json'"
echo La configuration des differents Addons de Firefox est presente dans le dossier %HOMEPATH%\Downloads.
2022-10-17 21:16:25 +02:00
:: === User Diag for drivers ==
2022-12-24 16:20:00 +01:00
echo Installe les pilotes, pour connaitre la liste des pilotes, utilise UserDiag https://userdiag.com/download
2022-10-17 21:16:25 +02:00
:: === W10Privacy ==
2023-01-04 12:36:17 +01:00
powershell -Command "Invoke-WebRequest -Uri https://git.kennel.ml/Anri/confOS/raw/branch/main/W10Privacy.ini -OutFile '%HOMEPATH%\Downloads\W10Privacy.ini'"
echo Ensuite, utilise W10Privacy (https://www.w10privacy.de/deutsch-start/download/) avec le fichier present dans %HOMEPATH%\Downloads (version 4.0.0.1).
2022-12-16 12:44:51 +01:00
:: === Modules ==
powershell -Command "Install-PackageProvider -Name NuGet -Force"
powershell -Command "Install-Module -Name PSWindowsUpdate -Force"
2022-12-24 16:16:58 +01:00
:: === Scripts ==
mkdir %HOMEPATH%\Documents\Local
2023-01-04 12:36:17 +01:00
powershell -Command "Invoke-WebRequest -Uri https://git.kennel.ml/Anri/confOS/raw/branch/main/windows/ctmpf.bat -OutFile '%HOMEPATH%\Documents\Local\ctmpf.bat'"
powershell -Command "Invoke-WebRequest -Uri https://git.kennel.ml/Anri/confOS/raw/branch/main/windows/spotx.bat -OutFile '%HOMEPATH%\Documents\Local\spotx.bat'"
powershell -Command "Invoke-WebRequest -Uri https://git.kennel.ml/Anri/confOS/raw/branch/main/windows/update.bat -OutFile '%HOMEPATH%\Documents\Local\update.bat'"
2022-12-24 16:16:58 +01:00
2023-01-04 11:44:42 +01:00
:: === OpenTabletDriver ==
:: Download
2023-01-04 12:36:17 +01:00
powershell -Command "Invoke-WebRequest -Uri https://opentabletdriver.net/Release/Download/OpenTabletDriver.win-x64.zip -OutFile '%HOMEPATH%\Downloads\OpenTabletDriver.win-x64.zip'"
2023-01-04 11:44:42 +01:00
:: Extract
2023-01-04 12:36:17 +01:00
powershell -Command "Expand-Archive -Path '%HOMEPATH%\Downloads\OpenTabletDriver.win-x64.zip' -DestinationPath '%ProgramFiles%\OpenTabletDriver'"
2023-01-04 11:44:42 +01:00
:: Create shortcut
powershell -Command "& { $WshShell = New-Object -comObject WScript.Shell; $Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\OpenTabletDriver.lnk'); $Shortcut.TargetPath = '%ProgramFiles%\OpenTabletDriver\OpenTabletDriver.UX.Wpf.exe'; $Shortcut.Save() }"
2023-01-04 12:16:11 +01:00
:: WindowsInk
2023-01-04 12:36:17 +01:00
powershell -Command "Invoke-WebRequest -Uri https://github.com/X9VoiD/vmulti-bin/releases/download/v1.0/Driver.zip -OutFile '%HOMEPATH%\Downloads\Driver-VMulti.zip'"
2023-01-04 12:16:11 +01:00
:: Extract
2023-01-04 12:36:17 +01:00
powershell -Command "Expand-Archive -Path '%HOMEPATH%\Downloads\Driver-VMulti.zip' -DestinationPath '%HOMEPATH%\Downloads\Driver-VMulti'"
2023-01-04 12:16:11 +01:00
:: Install driver
call %HOMEPATH%\Downloads\Driver-VMulti\64\install_hiddriver.bat
:: Download plugin
2023-01-04 12:36:17 +01:00
powershell -Command "Invoke-WebRequest -Uri https://github.com/X9VoiD/VoiDPlugins/releases/latest/download/WindowsInk.zip -OutFile '%HOMEPATH%\Downloads\WindowsInk.zip'"
2023-01-04 12:16:11 +01:00
:: Extract plugin
2023-01-04 12:36:17 +01:00
powershell -Command "Expand-Archive -Path '%HOMEPATH%\Downloads\WindowsInk.zip' -DestinationPath '%LOCALAPPDATA%\OpenTabletDriver\Plugins\Windows Ink'"
2023-01-04 12:16:11 +01:00
2022-11-13 13:03:40 +01:00
:: === Miscellaneous ==
:: Rename shortcut for Minecraft
C:\Users\anri\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
rename "%APPDATA%\Microsoft\Windows\Start Menu\Programs\PrismLauncher.lnk" Minecraft.lnk
echo Fais un tour des parametres Windows, apres avoir fait toutes les mises a jour disponible sur le PC.
echo Enfin, redemarre l'ordinateur
2022-09-30 12:45:41 +02:00
pause
exit /b