follow the format of cmd /?
This commit is contained in:
parent
c3acbd2fb8
commit
8a41d9a283
4 changed files with 80 additions and 78 deletions
|
@ -1,43 +1,45 @@
|
|||
@echo off
|
||||
@ECHO off
|
||||
|
||||
:: Start as administrator
|
||||
fltmc >nul 2>&1 || (
|
||||
powershell Start -Verb RunAs '%0' 2> nul || (
|
||||
exit 1
|
||||
PowerShell Start -Verb RunAs '%0' 2> nul || (
|
||||
EXIT 1
|
||||
)
|
||||
exit 0
|
||||
EXIT 0
|
||||
)
|
||||
|
||||
echo CTMPF :: Clean TeMPorary Files
|
||||
ECHO CTMPF :: Clean TeMPorary Files
|
||||
|
||||
:: Empty the user's temp folder
|
||||
echo Suppression fichiers dans %TEMP%...
|
||||
del /f /q %LOCALAPPDATA%\Temp\* 2> nul
|
||||
rd /s /q "%TEMP%" 2> nul
|
||||
ECHO Suppression fichiers dans %TEMP%...
|
||||
DEL /f /q %LOCALAPPDATA%\Temp\* 2> nul
|
||||
RMDIR /s /q "%TEMP%" 2> nul
|
||||
|
||||
|
||||
:: Empty the system's temp folder
|
||||
echo Suppression fichiers dans %WINDIR%\Temp...
|
||||
rd /s /q "%WINDIR%\Temp" 2> nul
|
||||
ECHO Suppression fichiers dans %WINDIR%\Temp...
|
||||
RMDIR /s /q "%WINDIR%\Temp" 2> nul
|
||||
|
||||
:: Empty the Prefetch folder
|
||||
echo Suppression fichiers dans %WINDIR%\Prefetch...
|
||||
rd /s /q "%WINDIR%\Prefetch" 2> nul
|
||||
ECHO Suppression fichiers dans %WINDIR%\Prefetch...
|
||||
RMDIR /s /q "%WINDIR%\Prefetch" 2> nul
|
||||
|
||||
:: Remove old Windows installation
|
||||
if exist "%SYSTEMDRIVE%\Windows.old" (
|
||||
echo Supprime l'ancienne installation de Windows %SYSTEMDRIVE%\Windows.old...
|
||||
takeown /f "%SYSTEMDRIVE%\Windows.old" /a /r /d y
|
||||
icacls "%SYSTEMDRIVE%\Windows.old" /grant administrators:F /t
|
||||
rd /s /q "%SYSTEMDRIVE%\Windows.old"
|
||||
ECHO Supprime l'ancienne installation de Windows %SYSTEMDRIVE%\Windows.old...
|
||||
TAKEOWN /f "%SYSTEMDRIVE%\Windows.old" /a /r /d y
|
||||
ICACLS "%SYSTEMDRIVE%\Windows.old" /grant administrators:F /t
|
||||
RMDIR /s /q "%SYSTEMDRIVE%\Windows.old"
|
||||
)
|
||||
|
||||
:: Clear thumbnail cache
|
||||
echo Effacer le cache des miniatures de l'explorateur de fichiers...
|
||||
del /f /s /q /a %LOCALAPPDATA%\Microsoft\Windows\Explorer\*.db
|
||||
ECHO Effacer le cache des miniatures de l'explorateur de fichiers...
|
||||
DEL /f /s /q /a %LOCALAPPDATA%\Microsoft\Windows\Explorer\*.db
|
||||
|
||||
:: Clean disks
|
||||
echo Nettoyage de l'ordinateur avec cleanmgr...
|
||||
cd %WINDIR%\system32
|
||||
ECHO Nettoyage de l'oRMDIRinateur avec cleanmgr...
|
||||
CD %WINDIR%\system32
|
||||
cleanmgr.exe /AUTOCLEAN
|
||||
cleanmgr.exe /VERYLOWDISK
|
||||
|
||||
EXIT /b
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@echo off
|
||||
@ECHO off
|
||||
|
||||
:: Patch spotify
|
||||
powershell -Command "&{[Net.ServicePointManager]::SecurityProtocol =" ^
|
||||
PowerShell -Command "&{[Net.ServicePointManager]::SecurityProtocol =" ^
|
||||
"[Net.SecurityProtocolType]::Tls12}; """"& {" ^
|
||||
"$((Invoke-WebRequest -UseBasicParsing" ^
|
||||
"'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1').Content)}" ^
|
||||
|
@ -11,10 +11,10 @@ powershell -Command "&{[Net.ServicePointManager]::SecurityProtocol =" ^
|
|||
" """" | Invoke-Expression"
|
||||
|
||||
:: Delete newly created Spotify shortcut
|
||||
del %HOMEPATH%\Desktop\Spotify.lnk
|
||||
echo Raccourci sur le Bureau detruit
|
||||
taskkill /IM explorer.exe /F
|
||||
start explorer.exe
|
||||
DEL %HOMEPATH%\Desktop\Spotify.lnk
|
||||
ECHO Raccourci sur le Bureau detruit
|
||||
TASKKILL /IM explorer.exe /F
|
||||
START explorer.exe
|
||||
|
||||
pause
|
||||
exit /b
|
||||
PAUSE
|
||||
EXIT /b
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
@echo off
|
||||
@ECHO off
|
||||
|
||||
:: Start as administrator
|
||||
fltmc >nul 2>&1 || (
|
||||
powershell Start -Verb RunAs '%0' 2> nul || (
|
||||
exit 1
|
||||
PowerShell Start -Verb RunAs '%0' 2> nul || (
|
||||
EXIT 1
|
||||
)
|
||||
exit 0
|
||||
EXIT 0
|
||||
)
|
||||
|
||||
:: Windows programs
|
||||
winget upgrade -h --all
|
||||
|
||||
:: Windows Update
|
||||
powershell -Command "Set-ExecutionPolicy Bypass -Scope Process;" ^
|
||||
PowerShell -Command "Set-ExecutionPolicy Bypass -Scope Process;" ^
|
||||
"Get-WindowsUpdate -AcceptAll -Install"
|
||||
|
||||
pause
|
||||
exit /b
|
||||
PAUSE
|
||||
EXIT /b
|
||||
|
|
|
@ -1,50 +1,50 @@
|
|||
@echo off
|
||||
@ECHO off
|
||||
|
||||
:: Start as administrator
|
||||
fltmc >nul 2>&1 || (
|
||||
powershell Start -Verb RunAs '%0' 2> nul || (
|
||||
PowerShell Start -Verb RunAs '%0' 2> nul || (
|
||||
exit 1
|
||||
)
|
||||
exit 0
|
||||
)
|
||||
|
||||
:: === 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
|
||||
|
||||
:: === Disabling the gamebar ==
|
||||
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
|
||||
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
|
||||
|
||||
:: === Disabling widgets ==
|
||||
reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 00000000 /f
|
||||
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 00000000 /f
|
||||
|
||||
:: === Disabling hibernation ==
|
||||
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 00000000 /f
|
||||
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 00000000 /f
|
||||
powercfg /H off
|
||||
|
||||
:: === Disabling the SysMain service ==
|
||||
sc stop "SysMain" & sc config "SysMain" start=disabled
|
||||
|
||||
:: === Added confirmation when trashing ==
|
||||
reg ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v ConfirmFileDelete /t REG_DWORD /d 00000001 /f
|
||||
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v ConfirmFileDelete /t REG_DWORD /d 00000001 /f
|
||||
|
||||
:: === Don't create a Zone:Identify ==
|
||||
reg ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v SaveZoneInformation /t REG_DWORD /d 00000001 /f
|
||||
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v SaveZoneInformation /t REG_DWORD /d 00000001 /f
|
||||
|
||||
:: === Disables memory integrity ==
|
||||
:: see https://support.microsoft.com/en-us/windows/options-to-optimize-gaming-performance-in-windows-11-a255f612-2949-4373-a566-ff6f3f474613
|
||||
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v Enabled /t REG_DWORD /d 00000000 /f
|
||||
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v Enabled /t REG_DWORD /d 00000000 /f
|
||||
|
||||
:: === Disables sticky keys ==
|
||||
reg ADD "HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 506 /f
|
||||
REG ADD "HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 506 /f
|
||||
|
||||
:: === Inverts the default shortcuts for changing input language and keyboard layout ==
|
||||
reg ADD "HKEY_CURRENT_USER\Keyboard Layout\toggle" /v "Hotkey" /t REG_SZ /d 1 /f
|
||||
reg ADD "HKEY_CURRENT_USER\Keyboard Layout\toggle" /v "Language Hotkey" /t REG_SZ /d 2 /f
|
||||
REG ADD "HKEY_CURRENT_USER\Keyboard Layout\toggle" /v "Hotkey" /t REG_SZ /d 1 /f
|
||||
REG ADD "HKEY_CURRENT_USER\Keyboard Layout\toggle" /v "Language Hotkey" /t REG_SZ /d 2 /f
|
||||
|
||||
:: === Application downloads ==
|
||||
:: Auto accept ToT
|
||||
echo Y | winget list >nul
|
||||
ECHO Y | winget list >nul
|
||||
|
||||
winget install -he Mozilla.Firefox
|
||||
winget install -he 7zip.7zip
|
||||
|
@ -92,63 +92,63 @@ winget install -he Microsoft.VCRedist.2015+.x64
|
|||
wsl --install
|
||||
|
||||
:: Install Spotify
|
||||
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"
|
||||
PowerShell -Command "&{[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}; """"& { $((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/aMKDIR64fox/SpotX/main/Install.ps1').Content)} -confirm_uninstall_ms_spoti -confirm_spoti_recomended_over -podcasts_on -cache_on -block_update_off"""" | Invoke-Expression"
|
||||
|
||||
:: === Firefox configuration ==
|
||||
"%ProgramFiles%\Mozilla Firefox\firefox.exe"
|
||||
taskkill /im firefox.exe /F
|
||||
TASKKILL /im firefox.exe /F
|
||||
|
||||
for /F %%i in ('dir /B /S ^"%APPDATA%\Mozilla\Firefox\Profiles\*.default-release^"') do set vbc=%%i
|
||||
powershell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/user.js -OutFile '%vbc%/user.js'"
|
||||
PowerShell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/user.js -OutFile '%vbc%/user.js'"
|
||||
|
||||
powershell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/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.mylloon.fr/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.
|
||||
PowerShell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/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.mylloon.fr/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.
|
||||
|
||||
:: === User Diag for drivers ==
|
||||
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
|
||||
|
||||
:: === W10Privacy ==
|
||||
powershell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/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).
|
||||
PowerShell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/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).
|
||||
|
||||
:: === Modules ==
|
||||
powershell -Command "Install-PackageProvider -Name NuGet -Force"
|
||||
powershell -Command "Install-Module -Name PSWindowsUpdate -Force"
|
||||
PowerShell -Command "Install-PackageProvider -Name NuGet -Force"
|
||||
PowerShell -Command "Install-Module -Name PSWindowsUpdate -Force"
|
||||
|
||||
:: === Scripts ==
|
||||
mkdir %HOMEPATH%\Documents\Local
|
||||
powershell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/windows/ctmpf.bat -OutFile '%HOMEPATH%\Documents\Local\ctmpf.bat'"
|
||||
powershell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/windows/spotx.bat -OutFile '%HOMEPATH%\Documents\Local\spotx.bat'"
|
||||
powershell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/windows/update.bat -OutFile '%HOMEPATH%\Documents\Local\update.bat'"
|
||||
MKDIR %HOMEPATH%\Documents\Local
|
||||
PowerShell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/windows/ctmpf.bat -OutFile '%HOMEPATH%\Documents\Local\ctmpf.bat'"
|
||||
PowerShell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/windows/spotx.bat -OutFile '%HOMEPATH%\Documents\Local\spotx.bat'"
|
||||
PowerShell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/windows/update.bat -OutFile '%HOMEPATH%\Documents\Local\update.bat'"
|
||||
|
||||
:: === OpenTabletDriver ==
|
||||
:: Download
|
||||
powershell -Command "Invoke-WebRequest -Uri https://opentabletdriver.net/Release/Download/OpenTabletDriver.win-x64.zip -OutFile '%HOMEPATH%\Downloads\OpenTabletDriver.win-x64.zip'"
|
||||
PowerShell -Command "Invoke-WebRequest -Uri https://opentabletdriver.net/Release/Download/OpenTabletDriver.win-x64.zip -OutFile '%HOMEPATH%\Downloads\OpenTabletDriver.win-x64.zip'"
|
||||
:: Extract
|
||||
powershell -Command "Expand-Archive -Path '%HOMEPATH%\Downloads\OpenTabletDriver.win-x64.zip' -DestinationPath '%ProgramFiles%\OpenTabletDriver'"
|
||||
PowerShell -Command "Expand-Archive -Path '%HOMEPATH%\Downloads\OpenTabletDriver.win-x64.zip' -DestinationPath '%ProgramFiles%\OpenTabletDriver'"
|
||||
:: 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() }"
|
||||
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() }"
|
||||
|
||||
:: WindowsInk
|
||||
powershell -Command "Invoke-WebRequest -Uri https://github.com/X9VoiD/vmulti-bin/releases/download/v1.0/Driver.zip -OutFile '%HOMEPATH%\Downloads\Driver-VMulti.zip'"
|
||||
PowerShell -Command "Invoke-WebRequest -Uri https://github.com/X9VoiD/vmulti-bin/releases/download/v1.0/Driver.zip -OutFile '%HOMEPATH%\Downloads\Driver-VMulti.zip'"
|
||||
:: Extract
|
||||
powershell -Command "Expand-Archive -Path '%HOMEPATH%\Downloads\Driver-VMulti.zip' -DestinationPath '%HOMEPATH%\Downloads\Driver-VMulti'"
|
||||
PowerShell -Command "Expand-Archive -Path '%HOMEPATH%\Downloads\Driver-VMulti.zip' -DestinationPath '%HOMEPATH%\Downloads\Driver-VMulti'"
|
||||
:: Install driver
|
||||
call %HOMEPATH%\Downloads\Driver-VMulti\64\install_hiddriver.bat
|
||||
CALL %HOMEPATH%\Downloads\Driver-VMulti\64\install_hiddriver.bat
|
||||
:: Download plugin
|
||||
powershell -Command "Invoke-WebRequest -Uri https://github.com/X9VoiD/VoiDPlugins/releases/latest/download/WindowsInk.zip -OutFile '%HOMEPATH%\Downloads\WindowsInk.zip'"
|
||||
PowerShell -Command "Invoke-WebRequest -Uri https://github.com/X9VoiD/VoiDPlugins/releases/latest/download/WindowsInk.zip -OutFile '%HOMEPATH%\Downloads\WindowsInk.zip'"
|
||||
:: Extract plugin
|
||||
powershell -Command "Expand-Archive -Path '%HOMEPATH%\Downloads\WindowsInk.zip' -DestinationPath '%LOCALAPPDATA%\OpenTabletDriver\Plugins\Windows Ink'"
|
||||
PowerShell -Command "Expand-Archive -Path '%HOMEPATH%\Downloads\WindowsInk.zip' -DestinationPath '%LOCALAPPDATA%\OpenTabletDriver\Plugins\Windows Ink'"
|
||||
|
||||
echo Installe Xournal++ via https://xournalpp.github.io/installation/windows/
|
||||
ECHO Installe Xournal++ via https://xournalpp.github.io/installation/windows/
|
||||
|
||||
:: === Miscellaneous ==
|
||||
:: Rename shortcut for Minecraft
|
||||
rename "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Prism Launcher.lnk" Minecraft.lnk
|
||||
RENAME "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Prism Launcher.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
|
||||
ECHO Fais un tour des parametres Windows, apres avoir fait toutes les mises a jour disponible sur le PC.
|
||||
ECHO Enfin, redemarre l'ordinateur
|
||||
|
||||
pause
|
||||
exit /b
|
||||
PAUSE
|
||||
EXIT /b
|
||||
|
|
Loading…
Reference in a new issue