Il problema presente nelle versioni precedenti è stato risolto nell'ultima versione; l'installazione dell'account di sistema funziona finalmente correttamente!
Codice: Seleziona tutto
# -*- coding: utf-8 -*-
from setuphelpers import *
# Defining variables
bin_name_string = 'Stormshield_SSLVPN_Client_%s_win10_fr_x64.msi'
vpn_server = 'xxx.yyy.zzz' # Set default vpn server fqdn to connect to
def install():
# Initializing variables
package_version = control.get_software_version()
bin_name = bin_name_string % package_version
# Installing the package
print('Installing %s' % bin_name)
install_msi_if_needed(bin_name)
killalltasks(control.impacted_process.split(",")) # Kill client process launched with system account
create_programs_menu_shortcut('Stormshield SSL VPN Client','C:\Program Files\Stormshield\Stormshield SSL VPN Client\sslvpn_client.exe',wDir='C:\Program Files\Stormshield\Stormshield SSL VPN Client\\',folder='Stormshield SSL VPN Client')
def session_setup():
# Initializing variables
currentuser = os.getlogin()
# Configuring user client default vpn server to connect to
registry_set(HKEY_CURRENT_USER,r'Software\\STORMSHIELD\\STORMSHIELD SSL VPN CLIENT','address',vpn_server,type=REG_SZ)
registry_set(HKEY_CURRENT_USER,r'Software\\STORMSHIELD\\STORMSHIELD SSL VPN CLIENT','automatic','true',type=REG_SZ)
registry_set(HKEY_CURRENT_USER,r'Software\\STORMSHIELD\\STORMSHIELD SSL VPN CLIENT','username',currentuser,type=REG_SZ)
def uninstall():
remove_programs_menu_folder('Stormshield SSL VPN Client')- Il codice è stato aggiornato perché la chiave di disinstallazione cambia tra ogni versione del software; la funzione install_msi_if_needed lo gestisce molto bene, quindi possiamo anche fare affidamento su di essa

- Lo stesso vale per impacted_process una volta inserito nel file di controllo "sslvpn_client"



