You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2022-11-22 10:10:32

WizzurdOfOdd
Member
Registered: 2022-11-15
Posts: 21

GLPI Inventory

Hi,

just a short question, so i "accidentally" deleted one of my monitors and removed it from the Recycle bin. How do i trigger an agent to recollect all the information, like it was done initially?

for a little background, i have done this, as i have first added all my clients with monitors and everything and only after that realized, that it does not automatically create inventory numbers sad
so i downloaded the Inventory Number Generation Plugin from the market place and created a template for Monitors and Computers where Inventory Number is <\g#####> i found this somewhere here in the forum big_smile

i hope someone can help me here smile

Offline

#2 2022-11-22 13:18:00

WizzurdOfOdd
Member
Registered: 2022-11-15
Posts: 21

Re: GLPI Inventory

i just saw i have a little change in my server address of the agent sad ... thats why it did not work

just to check anyone here who had to change the server address of the agent AFTER distributing it to a lot of clients?
i tried with msiexec /i MSIagent.msi /quiet SERVER=http://myserveraddress/marketplace/glpiinventory /norestart ALLUSERS=2
but it seems that this command does only install the software, but not reinstall it with modified values.

the SERVER switch works, as when i remove /quiet it shows up while the installation but somehow i cant quietly reinstall it hmm

Offline

#3 2022-11-22 13:34:30

WebGreg
Member
Registered: 2020-02-27
Posts: 740

Re: GLPI Inventory

Hi.


After changing the server address, I do not reinstall the agents, I only change the value in the registry:

reg add HKLM\SOFTWARE\GLPI-Agent /v server /d new_address /t REG_SZ /f


--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS

Offline

#4 2022-11-22 14:41:05

WizzurdOfOdd
Member
Registered: 2022-11-15
Posts: 21

Re: GLPI Inventory

thank you WebGreg smile worked like a charm

Offline

#5 2022-11-22 19:57:57

WebGreg
Member
Registered: 2020-02-27
Posts: 740

Re: GLPI Inventory

My pleasure.
You can also change other settings in this way. Just check what else cool in this key you can find.

In this way, I also automated the software update. I check the GLPI version in the registry and if it is different than expected, batch starts with the new installer. And this is the only time I reinstall the agent.

Last edited by WebGreg (2022-11-22 19:58:21)


--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS

Offline

#6 2022-12-13 07:59:09

sempermilan82
Member
Registered: 2022-02-01
Posts: 2

Re: GLPI Inventory

WebGreg wrote:

My pleasure.
You can also change other settings in this way. Just check what else cool in this key you can find.

In this way, I also automated the software update. I check the GLPI version in the registry and if it is different than expected, batch starts with the new installer. And this is the only time I reinstall the agent.

Hello... sorry could you send me the bat you use to update? I'm interested.

Offline

#7 2022-12-13 09:59:04

WebGreg
Member
Registered: 2020-02-27
Posts: 740

Re: GLPI Inventory

set "agentCurrent=1.4"
set "agentInstalled="

reg query "HKEY_LOCAL_MACHINE\SOFTWARE\GLPI-Agent\Installer" /V version  >NUL
	IF %ERRORLEVEL% == 0 (
		echo Key exists
		for /f "tokens=3" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\GLPI-Agent\Installer" /V version  ^|findstr /ri "REG_SZ"') do SET agentInstalled=%%a
	)
	
	IF "!agentInstalled!" == "!agentCurrent!" goto end

COPY !installFolder!\glpi-agent-deployment.vbs c:\temp\
cscript c:\temp\glpi-agent-deployment.vbs


:end

--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS

Offline

Board footer

Powered by FluxBB