Customizing the user environment¶
It is sometimes necessary to customize a software in user context to set specific settings or to comply to the Organization’s rules and preferences:
- creating user desktop shortcut with specific arguments;
- making changes to user Windows registry keys;
- making changes to files, to browser settings of the user;
- configure shortcuts to the Organization’s set of templates for Documents, Spreadsheets or Présentations in Office Suites to encourage or insure that editorial and graphical guidelines are followed;
- set the user’s email or instant mail settings from the Organization’s main user data repository (LDAP directory, database, etc);
- parameter an office suite or business software based on the Organization’s main user data repository (LDAP directory, database, etc);
The session_setup function benefits from the power of python to achieve a high level of automation.
Principles of session_setup¶
The WAPT session_setup function executes at every user startup, launching that command:
C:\Program Files (x86)\wapt\wapt-get.exe session-setup ALL
Calling that function executes the session_setup script defined within each WAPT package installed on the computer.
The WAPT agent stores in its local database (
C:\Program Files (x86)\wapt\waptdb.sqlite) the instruction sets of all WAPT packages.
session_setup is launched only once per WAPT package version and per user.
The WAPT agent stores in is local
%appdata%\wapt\waptsession.sqlite database the instances of session_setup that have been already been played.
To launch a program at every startup, consider using a startup script located in User Startup (
startup(0)) or All Users Startup (
startup(1)), or via a GPO.
Output example of
wapt-get session-setup ALL
the connected user’s
session_setup had already been launched.
wapt-get session-setup ALL Configuring tis-7zip ... No session-setup. Done Configuring tis-ccleaner ... Already installed. Done Configuring tis-vlc ... No session-setup. Done Configuring tis-tightvnc ... No session-setup. Done Configuring tis-paint.net ... No session-setup. Done Configuring wsagauvrit.domain.lan ... No session-setup. Done
The :command`session_setup` scripts are located in the section
def session_setup() of the :file`setup.py` file:
def session_setup(): registry_setstring(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows Live\\Common",'TOUVersion','22.214.171.124', type=REG_SZ)
With session_setup, there is no possibility to call files contained inside the WAPT package.
To call external files when uninstalling, copy and paste the needed files in an external folder during the package installation process (example: a directory created in the User’s own directory).