WAPT version: 2.3
license: company
server: debian 11
test: Windows 2019
I'm creating a package to install an iVanti VPN client software (formerly Pulse)
It's an .msi file
I need to install the VPN client by reading the configuration file, which is located in the package directory
I need to send the complete directory or the configuration file as a parameter
example
msiexec /i PulseSecure.x64.msi CONFIGFILE="c:\temp\my configuration..pulsepreconfig "
How can I retrieve the full path of the VPN-TELETRAVAIL.pulsepreconfig file?
properties = {"CONFIGFILE":"?????VPN-TELETRAVAIL.pulsepreconfig"}
With this on pyscripter, it works.
properties = {"CONFIGFILE":"C:\waptdev\cd12-ivanti-secure-access-client_22.2.1295_x64_Windows_PROD\VPN-TELETRAVAIL.pulsepreconfig"}
Code: Select all
service_name = 'PulseSecureService'
bin_name = glob.glob("PulseSecure-*.msi")[0]
configuration_file = glob.glob("*.pulsepreconfig")[0]
properties = {"CONFIGFILE":"VPN-TELETRAVAIL.pulsepreconfig"}
def install():
# Declaring local variables
# Installing the software
print("Installation de : PulseSecure-x64-%s avec le fichier de configuration %s pour les utilisateurs hors DSI " % (bin_name,configuration_file))
install_msi_if_needed(bin_name,properties = properties)
def audit():
if not service_installed(service_name):
print("ERREUR : Le service %s n'est pas installé " % service_name)
return "ERROR"
if not service_is_running (service_name):
print("ERREUR : Le service %s n'est pas lancé " % service_name)
return "WARNING"
if not service_get_start_mode(service_name) == 'Auto':
print("ERREUR : le service %s n'est pas en demarrage automatique" % service_name)
return "WARNING"
else:
print("Le service %s est lancé " % service_name)
return "OK"
