repo size reduction
This commit is contained in:
41
glpi/check-install.cmd
Normal file
41
glpi/check-install.cmd
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
@echo off
|
||||
rem ----------------------------------------------------------------------------
|
||||
rem GLPI-Agent Installer
|
||||
rem
|
||||
rem Diese Script prüft ob Registry-Einträge für den GLPI-Agent vorhanden sind.
|
||||
rem Falls Ja : keine Aktion
|
||||
rem Falls Nein: Automatische Installation
|
||||
rem
|
||||
rem Falls eine Datei C:\reinstallglpi.txt vorhanden ist, oder die Agent-Version
|
||||
rem abweicht wird eine Neuinstallation erzwungen.
|
||||
rem ----------------------------------------------------------------------------
|
||||
|
||||
set AGENTVERSION=1.11
|
||||
set GLPISERVER="https://glpi.albrecht-elektrotechnik.local/plugins/glpiinventory/"
|
||||
|
||||
REG QUERY "HKLM\SOFTWARE\GLPI-Agent\Installer" /t REG_SZ /v Version | find "%AGENTVERSION%" > NUL && set AGENT=Installed || set AGENT=NotInstalled
|
||||
|
||||
IF EXIST "c:\temp\reinstallglpi.txt" GOTO Force
|
||||
IF %AGENT%==Installed GOTO Installed
|
||||
IF %AGENT%==NotInstalled GOTO Install
|
||||
GOTO END
|
||||
|
||||
:Force
|
||||
del c:\temp\reinstallglpi.txt
|
||||
echo "Neuinstallation forciert..."
|
||||
|
||||
:Install
|
||||
echo "Installiere GLPI-Agent..."
|
||||
cscript //B //Nologo glpi-agent-deployment.vbs /version:%AGENTVERSION% /glpisrv:%GLPISERVER%
|
||||
GOTO END
|
||||
|
||||
:Installed
|
||||
echo "GLPI scheint schon installiert zu sein...."
|
||||
GOTO END
|
||||
|
||||
:END
|
||||
echo "Script wird beendet..."
|
||||
|
||||
rem exit 0
|
||||
rem REG QUERY "HKLM\SOFTWARE\GLPI-Agent\Installer" | find /i "ExecMode" > NUL && set AGENT=Installed || set AGENT=NotInstalled
|
Reference in New Issue
Block a user