Skip to content
Snippets Groups Projects
Commit b3c74f1f authored by LABORIE Stéphane's avatar LABORIE Stéphane
Browse files

modif pour gestion win 10 ltsc

parent 9468e517
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ setlocal
:: Activation de Windows
SET QUESTIONCLE="Z"
SET /P QUESTIONCLE=Activer sur KMS unistra (K)? (Toute autre touche continuera sans activation)
IF /I %QUESTIONCLE% EQU K GOTO KMS
IF /I %QUESTIONCLE% EQU K GOTO LTSC
GOTO DRIVERS
:KMS
......@@ -13,7 +13,7 @@ IF /I %QUESTIONCLE% EQU E GOTO ENTERPRISE
IF /I %QUESTIONCLE% EQU P GOTO PRO
GOTO DRIVERS
:ENTERPRISE
:LTSC
cscript \windows\system32\slmgr.vbs /upk
cscript \windows\system32\slmgr.vbs /cpky
cscript \windows\system32\slmgr.vbs /ipk M7XTQ-FN8P6-TTKYV-9D4CC-J462D
......
@echo off
setlocal
:: Activation de Windows
SET QUESTIONCLE="Z"
SET /P QUESTIONCLE=Activer sur KMS unistra (K)? (Toute autre touche continuera sans kms)
IF /I %QUESTIONCLE% EQU K GOTO PRO
GOTO DRIVERS
:KMS
SET /P QUESTIONCLE=Changer la cle Windows par une cle KMS Enterprise (E), Pro (P) (Toute autre touche continuera sans activation)?
IF /I %QUESTIONCLE% EQU E GOTO ENTERPRISE
IF /I %QUESTIONCLE% EQU P GOTO PRO
GOTO DRIVERS
:ENTERPRISE
cscript \windows\system32\slmgr.vbs /upk
cscript \windows\system32\slmgr.vbs /cpky
cscript \windows\system32\slmgr.vbs /ipk M7XTQ-FN8P6-TTKYV-9D4CC-J462D
GOTO SUITE
:PRO
cscript \windows\system32\slmgr.vbs /upk
cscript \windows\system32\slmgr.vbs /cpky
cscript \windows\system32\slmgr.vbs /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
GOTO SUITE
:SUITE
cscript \windows\system32\slmgr.vbs -skms snkms.unistra.fr
cscript \windows\system32\slmgr.vbs -ato
echo "Appuyez sur une touche pour continuer"
GOTO DRIVERS
:DRIVERS
:: On cherche le fabricant du PC
for /f "tokens=1* delims==" %%a in (
'wmic computersystem get manufacturer /value'
) do for /f "delims=" %%c in ("%%~b") do set "manufacturer=%%c"
if not "x%manufacturer:Dell=%"=="x%manufacturer%" GOTO DELL
if not "x%manufacturer:HP=%"=="x%manufacturer%" GOTO HP
GOTO UNKNOWN
:NOINTERNET
echo "Pas de connection à internet, appuyez sur une touche quand la connection sera établie"
pause
GOTO DRIVERS
:DELL
set "STR=Telechargement des fichiers"
call :MESSAGE
curl -o %TEMP%\dotnet-4.8.exe -L https://go.microsoft.com/fwlink/?linkid=2088631
curl -o %TEMP%\dell-command-update.exe -L https://src.koda.cnrs.fr/mri-net/windows-ventoy-auto-install/-/raw/main/Files/Dell-Command-Update-Windows-Universal-Application_9M35M_WIN_5.4.0_A00.EXE
set "STR=Installation du dotnet 4.8"
call :MESSAGE
START /WAIT /I %TEMP%\dotnet-4.8.exe /passive /norestart
set "STR=Installation de dell command update"
call :MESSAGE
START /WAIT /I %TEMP%\dell-command-update.exe /s
set "STR=Installation des drivers avec dell command update"
call :MESSAGE
"%programfiles%\Dell\CommandUpdate\dcu-cli.exe" /configure -advancedDriverRestore=enable
"%programfiles%\Dell\CommandUpdate\dcu-cli.exe" /driverInstall
GOTO FIN
:HP
set "STR=Telechargement des fichiers"
call :MESSAGE
curl -o %TEMP%\hp-hpia-5.2.0.exe -L https://src.koda.cnrs.fr/mri-net/windows-ventoy-auto-install/-/raw/main/Files/hp-hpia-5.2.0.exe
set "TR=Installation de HP Image Assistant"
call :MESSAGE
START /WAIT /I %TEMP%\hp-hpia-5.2.0.exe /s /e /f "%ProgramFiles%\HPIA"
DEL "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\post_install.cmd"
START reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
set "STR=Installation des drivers avec HP Image Assistant"
"%ProgramFiles%\HPIA\HPImageAssistant.exe" /Operation:Analyze /Category:Drivers /Selection:All /Action:Install /Noninteractive /Debug /ReportFolder:%temp%
set "STR=Merci de redemarrer manuellement une fois que HP Image Assistant aura termine"
call :MESSAGE
pause
GOTO EOF
:UNKNOWN
echo "Fabricant PC inconnu
GOTO FIN
:MESSAGE
setLocal EnableDelayedExpansion
set "SIZE=80"
set "LEN=0"
:strLen_Loop
if not "!!STR:~%LEN%!!"=="" set /A "LEN+=1" & goto :strLen_Loop
set "stars=****************************************************************************************************"
set "spaces= "
call echo %%stars:~0,%SIZE%%%
set /a "pref_len=%SIZE%-%LEN%-2"
set /a "pref_len/=2"
set /a "suf_len=%SIZE%-%LEN%-2-%pref_len%"
call echo *%%spaces:~0,%pref_len%%%%%STR%%%%spaces:~0,%suf_len%%%*
call echo %%stars:~0,%SIZE%%%
GOTO :EOF
:FIN
set "STR=Redemarrage"
call :MESSAGE
DEL "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\post_install.cmd"
START reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
shutdown /r /F /T 0
This diff is collapsed.
......@@ -375,7 +375,7 @@
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>11</Order>
<CommandLine><![CDATA[cmd.exe /c echo curl https://src.koda.cnrs.fr/mri-net/windows-ventoy-auto-install/-/raw/main/Files/autoinstall.bat ^| MORE /P ^>%TEMP%\autoinstall.bat >> "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\post_install.cmd"]]></CommandLine>
<CommandLine><![CDATA[cmd.exe /c echo curl https://src.koda.cnrs.fr/mri-net/windows-ventoy-auto-install/-/raw/main/Files/autoinstall.bat ^| MORE /P ^>%TEMP%\autoinstall_w10pro.bat >> "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\post_install.cmd"]]></CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>12</Order>
......
......@@ -14,6 +14,12 @@
"/ventoy/Scripts/windows_10_PRO_autoinstall.xml"
]
},
{
"parent": "/_ISO/Windows 10/LTSC",
"template":[
"/ventoy/Scripts/windows_10_LTSC_autoinstall.xml"
]
},
{
"parent": "/_ISO/Windows 11",
"template":[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment