|
|
@ -1,26 +1,27 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
from setuphelpers import * |
|
|
|
from setuphelpers import * |
|
|
|
|
|
|
|
import json |
|
|
|
|
|
|
|
|
|
|
|
uninstallkey = [] |
|
|
|
uninstallkey = [] |
|
|
|
|
|
|
|
|
|
|
|
key='FusionInventory-Agent' |
|
|
|
key='FusionInventory-Agent' |
|
|
|
|
|
|
|
|
|
|
|
def install(): |
|
|
|
def install(): |
|
|
|
print('Opening variable file') |
|
|
|
print('Opening variable file') |
|
|
|
variables = json.loads(open(makepath(programfiles32,'wapt','variables.json'),'r').read()) |
|
|
|
variables = json.loads(open(makepath(programfiles32,'wapt','variables.json'),'r').read()) |
|
|
|
if not 'fusinv_server' in variables: |
|
|
|
if not 'fusinv_server' in variables: |
|
|
|
error('Missing fusinv_server variable') |
|
|
|
error('Missing fusinv_server variable') |
|
|
|
parameters = '/S /acceptlicense /server="%s" /execmode=service /runnow' % (variables['fusinv_server']) |
|
|
|
parameters = '/S /acceptlicense /server="%s" /execmode=service /runnow' % (variables['fusinv_server']) |
|
|
|
if 'fusinv_user' in variables and 'fusinv_pass' in variables: |
|
|
|
if 'fusinv_user' in variables and 'fusinv_pass' in variables: |
|
|
|
parameters = parameters + ' /user="%s" /password="%s"' % (variables['fusinv_user'],variables['fusinv_pass']) |
|
|
|
parameters = parameters + ' /user="%s" /password="%s"' % (variables['fusinv_user'],variables['fusinv_pass']) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print('installing Fusion inventory agent') |
|
|
|
print('installing Fusion inventory agent') |
|
|
|
versionpaquet = control['version'].split('-',1)[0] |
|
|
|
versionpaquet = control['version'].split('-',1)[0] |
|
|
|
if iswin64(): |
|
|
|
if iswin64(): |
|
|
|
install_exe_if_needed("fusioninventory-agent_windows-x64_%s.exe" % versionpaquet,parameters,key=key,min_version=versionpaquet) |
|
|
|
install_exe_if_needed("fusioninventory-agent_windows-x64_%s.exe" % versionpaquet,parameters,key=key,min_version=versionpaquet) |
|
|
|
else: |
|
|
|
else: |
|
|
|
install_exe_if_needed("fusioninventory-agent_windows-x86_%s.exe" % versionpaquet,parameters,key=key,min_version=versionpaquet) |
|
|
|
install_exe_if_needed("fusioninventory-agent_windows-x86_%s.exe" % versionpaquet,parameters,key=key,min_version=versionpaquet) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|