Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- cls
- cd /
- echo %DATE% %TIME% >> \\AD\logs\%computername%.txt
- echo Machine : %computername% >> \\AD\logs\%computername%.txt
- echo Utilisateur : %USERNAME% >> \\AD\logs\%computername%.txt
- echo Domaine : %USERDOMAIN% >> \\AD\logs\%computername%.txt
- echo System : %OS% >> \\AD\logs\%computername%.txt
- echo Architecture : %PROCESSOR_ARCHITECTURE% >> \\AD\logs\%computername%.txt
- echo . >> \\AD\logs\%computername%.txt
- echo Desinstallation d'OCS >> \\AD\logs\%computername%.txt
- if exist "C:\Program Files (x86)\OCS Inventory Agent\uninst.exe" (net stop "OCS INVENTORY SERVICE") >> \\AD\logs\%computername%.txt
- cd "C:\Program Files (x86)\OCS Inventory Agent\"
- uninst.exe /S >> \\AD\logs\%computername%.txt
- cd ..
- rmdir /S /Q "OCS Inventory Agent" >> \\AD\logs\%computername%.txt
- if not exist "C:\Program Files (x86)\OCS Inventory Agent\uninst.exe" echo Agent OCS desinstalle! >> \\AD\logs\%computername%.txt
- cd /
- if exist "ocs-ng" rmdir /S /Q "ocs-ng" >> \\AD\logs\%computername%.txt
- if not exist "ocs-ng" echo logs OCS supprime! >> \\AD\logs\%computername%.txt
- echo . >> \\AD\logs\%computername%.txt
- echo %DATE% %TIME% >> \\AD\logs\%computername%.txt
- echo Installation de l'agent fusioninventory >> \\AD\logs\%computername%.txt
- \\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
- echo %DATE% %TIME% fusioninventory_2.3.5 installe! >> \\AD\logs\%computername%.txt
- echo Redémarrage de la machine... >> \\AD\logs\%computername%.txt
- shutdown /t 5 /r /c "Installation du nouvel agent effectue. Redemarrage de la machine dans 10 secondes..."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement