Merci de ton retour, les fichiers sont bien dans le dossier "c:\deploy\", et il n'y a pas de log de l'installation de logiciels à ce que je sais.
Il faut que je vérifie
J'ai essayé le batch avec cette commande seule
code batch :
"C:\Deploy\DDSSuite.exe" -y -gm2 /S /z"\"SERVER=MonServeur.MonDomaine,FEATURES=DE-ATP\""
Mais cela n'a pas installé l'antivirus
Par contre, le batch avec cette commande a fonctionnée, l'antivirus s'est bien installé.
Code batch :
"C:\Deploy\DDSSuite.exe" -y -gm2 /S /z"\"SERVER=MonServeur.MonDomaine,FEATURES=DE-ATP""
Du coup j'ai modifié mon batch qui se lance au démarrage de la machine et il fonctionne
J'ai seulement modifié le if errorlevel 0 par if errorlevel 1
code batch :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| REM Paramétrage profil Wifi
cmd.exe /C netsh wlan add profile filename=C:\Deploy\MonWifi.xml
REM Barre des tâches
cmd.exe /C C:\Deploy\TaskBar.cmd
REM Modification UAC
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
reg add "HKEY_USERS\.DEFAULT\Control Panel\Keyboard" /v "InitialKeyboardIndicators" /t REG_SZ /d 2 /f
REM Ajout domaine
wmic.exe /interactive:off ComputerSystem Where name="%computername%" call JoinDomainOrWorkgroup FJoinOptions=3 Name="MonDomaine" UserName="User" Password="MotDePasse"
REM Installation Teamviewer Host
msiexec.exe /i "C:\Deploy\TeamViewer_Host.msi" /q CUSTOMCONFIGID=7xsnes3 APITOKEN=monapitoken ASSIGNMENTOPTIONS="--grant-easy-access --group-id Monid"
REM Installation antivirus
Call :GetModele Modele
::*******************************************************************
:GetModele <Modele>
FOR /F "tokens=2 delims==" %%I IN (
'wmic computersystem get model /format:list 2^>^nul'
) DO FOR /F "delims=" %%A IN ("%%I") DO SET "%1=%%A"
exit /b
::*******************************************************************
SET var=%modele%
SET searchVal=Optiplex
SET var|FINDSTR /b "var="|FINDSTR /i %searchVal% >nul
IF ERRORLEVEL 1 ("C:\Deploy\DDSSuite.exe" -y -gm2 /S /z"\"MonServeur.MonDomaine,FEATURES=DE-ATP"") ELSE (msiexec.exe /i "C:\Deploy\Trend_PDT.msi" /q /norestart)
REM Suppression dossier Deploy
rmdir C:\Deploy /s /q
REM Redémarrage dans 30 secondes
cmd.exe /C shutdown /r /t 30 |
Partager