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 2014-05-09 15:30:26

spea
Member
Registered: 2012-12-17
Posts: 52

FusionInventory-Agent-portable run from read only network share

Hi,

how can I start the "FusionInventory-Agent xXX-portable" for Windows
from a read only network share so that the data will be written from "/ var" to c: \ tmp?

Thanks

Offline

#2 2014-05-19 14:29:12

spea
Member
Registered: 2012-12-17
Posts: 52

Re: FusionInventory-Agent-portable run from read only network share

Hi,

here is my solution ...

1. Create directories with "FusionInventory-Agent-%OSArch%-portable" on network drive ?:\?\?\inventory

FusionInventory-Agent-x64-portable
FusionInventory-Agent-x86-portable

2. in "FusionInventory-Agent-%OSArch%-portable\perl\bin\fusioninventory-agent" change "vardir"

from:
vardir  => '../../var',
to:
vardir  => 'c:\\tmp\\FusionInventory-Agent-portable\\var',

3. Create "FusionInventory-Agent-portable.bat" batch file on network drive ?:\?\?\inventory

Run the script "FusionInventory-Agent-portable.bat" as Administrator


@echo off
echo :: ----------------------------------------------------------------------------
echo :: FusionInventory-Agent-portable.bat
echo :: Run the script "FusionInventory-Agent-portable.bat" as Administrator
echo :: ----------------------------------------------------------------------------

set DestinationDir=c:\tmp\FusionInventory-Agent-portable

if "%1" == "" (
for /F "tokens=2 delims==,-" %%a In ('wmic os get osarchitecture /value') Do set OSArchitecture=%%a
) else (
set OSArchitecture=%1
)

if "%OSArchitecture%" == "32" set OSArchitecture=x86
if "%OSArchitecture%" == "64" set OSArchitecture=x64
if "%OSArchitecture%" == "" goto end

if not exist "%DestinationDir%\var" mkdir %DestinationDir%\var
if not exist "%DestinationDir%\fusioninventory.log" echo %date% %time%, %~dpn0.bat > %DestinationDir%\fusioninventory.log

cd /d %~dp0FusionInventory-Agent-%OSArchitecture%-portable

if "%FusionInventory-Agent-PATH%" == "yes" goto NoPATH
set PATH=%CD%\perl\;%CD%\perl\bin;%CD%\nmap;%PATH%
set FusionInventory-Agent-PATH=yes
:NoPATH

%CD%\fusioninventory-agent.bat
cd ..\..\..\..\

:: ----------------------------------------------------------------------------
:end

Offline

#3 2019-07-31 15:33:04

jpnr79
Member
Registered: 2019-07-14
Posts: 3

Re: FusionInventory-Agent-portable run from read only network share

i change the vardir on setup.cpm and i get errors

Offline

Board footer

Powered by FluxBB