Bonjour,

nous avons un système qui déploie les images sur nos ordinateurs directement chez Dell.
Nous avons deux antivirus,Trend pour les ordinateurs fixes, et l'antivirus Dell pour les ordinateurs portables ou tablettes.
Le script qui suit ne fonctionne pas sur les ordinateurs fixes Dell Optiplex, mais sur les portables et tablettes il fonctionne.

Code Batch : Sélectionner tout - Visualiser dans une fenêtre à part
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
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="AdminDomaine" Password="MotDePasseAdmin"
 
REM Installation Teamviewer Host
msiexec.exe /i "C:\Deploy\TeamViewer_Host.msi" /q CUSTOMCONFIGID=7xsnes3 APITOKEN=*********************** ASSIGNMENTOPTIONS="--grant-easy-access --group-id *********"
 
REM Installation antivirus
for /f %%a in ('wmic computersystem get model^|findstr "Precision"') do (msiexec.exe /i "C:\Deploy\Trend_PDT.msi" /q /norestart)
for /f %%a in ('wmic computersystem get model^|findstr "Latitude"') do ("C:\Deploy\DDSSuite.exe" -y -gm2 /S /z"\"SERVER=MonServeur.MonDomaine,FEATURES=DE-ATP"")
for /f %%a in ('wmic computersystem get model^|findstr "Optiplex"') do ("C:\Deploy\DDSSuite.exe" -y -gm2 /S /z"\"SERVER=MonServeur.MonDomaine,FEATURES=DE-ATP"")
 
REM Suppression dossier Deploy
rmdir C:\Deploy /s /q
 
REM Redémarrage dans 30 secondes
cmd.exe /C shutdown /r /t 30

Du coup j'ai essayé de modifier le script avec le code suivant, mais il installe tout le temps l'antivirus trend
Code Batch : Sélectionner tout - Visualiser dans une fenêtre à part
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="AdminDomaine" Password="MotDePasseAdmin"
 
REM Installation Teamviewer Host
msiexec.exe /i "C:\Deploy\TeamViewer_Host.msi" /q CUSTOMCONFIGID=7xsnes3 APITOKEN=*********************** ASSIGNMENTOPTIONS="--grant-easy-access --group-id *********"
 
REM Installation antivirus
::*******************************************************************
: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
::*******************************************************************
call :GetModele get model
 
SET var=%modele%
SET searchVal=Optiplex
SET var|FINDSTR /b "var="|FINDSTR /i %searchVal% >nul
IF ERRORLEVEL 0 (msiexec.exe /i "C:\Deploy\Trend_PDT.msi" /q /norestart) ELSE ("C:\Deploy\DDSSuite.exe" -y -gm2 /S /z"\"SERVER=MonServeur.MonDomaine,FEATURES=DE-ATP"")
 
REM Suppression dossier Deploy
rmdir C:\Deploy /s /q
 
REM Redémarrage dans 30 secondes
cmd.exe /C shutdown /r /t 30

Pouvez-vous m'éclairer car je ne vois pas ce qui bloque?