View difference between Paste ID: SZuGAkQC and 9754qLny
SHOW: | | - or go back to the newest paste.
1
@echo off
2
cls
3
cd /
4
echo %DATE% %TIME% >> \\AD\logs\%computername%.txt
5
echo Machine : %computername% >> \\AD\logs\%computername%.txt
6
echo Utilisateur : %USERNAME% >> \\AD\logs\%computername%.txt
7
echo Domaine : %USERDOMAIN% >> \\AD\logs\%computername%.txt
8
echo System : %OS% >> \\AD\logs\%computername%.txt
9
echo Architecture : %PROCESSOR_ARCHITECTURE% >> \\AD\logs\%computername%.txt
10
echo . >> \\AD\logs\%computername%.txt
11
echo Desinstallation d'OCS >> \\AD\logs\%computername%.txt
12
if exist "C:\Program Files (x86)\OCS Inventory Agent\uninst.exe" (net stop "OCS INVENTORY SERVICE") >> \\AD\logs\%computername%.txt
13
cd "C:\Program Files (x86)\OCS Inventory Agent\"
14
uninst.exe /S >> \\AD\logs\%computername%.txt
15
cd ..
16
rmdir /S /Q "OCS Inventory Agent" >> \\AD\logs\%computername%.txt
17
if not exist "C:\Program Files (x86)\OCS Inventory Agent\uninst.exe" echo Agent OCS desinstalle! >> \\AD\logs\%computername%.txt
18
cd /
19
if exist "ocs-ng" rmdir /S /Q "ocs-ng" >> \\AD\logs\%computername%.txt
20
if not exist "ocs-ng" echo logs OCS supprime! >> \\AD\logs\%computername%.txt
21
echo . >> \\AD\logs\%computername%.txt
22
echo %DATE% %TIME% >> \\AD\logs\%computername%.txt
23
echo Installation de l'agent fusioninventory >> \\AD\logs\%computername%.txt
24-
\\AD\app\fusioninventory-agent_windows-x86_2.3.5.exe /S /server="http://192.168.147.131/glpi/plugins/fusioninventory/" /add-firewall-exception /acceptlicense /execmode=Service /installtype="from-scratch" /runnow >> \\AD\logs\%computername%.txt
24+
\\AD\app\fusioninventory-agent_windows-x86_2.3.5.exe /S /server="https://192.168.147.131/glpi/plugins/fusioninventory/" /no-ssl-check /add-firewall-exception /acceptlicense /execmode=Service /installtype="from-scratch" /runnow >> \\AD\logs\%computername%.txt
25
echo %DATE% %TIME% fusioninventory_2.3.5 installe! >> \\AD\logs\%computername%.txt
26
echo Redémarrage de la machine... >> \\AD\logs\%computername%.txt
27
shutdown /t 5 /r /c "Installation du nouvel agent effectue. Redemarrage de la machine dans 10 secondes..."