I'm having a problem with the `session_setup()` function, which isn't running automatically. We've upgraded to the latest version of WAPT Enterprise 2.6.0.016613, and so far I've only tested the package in question, which works except for the `session_setup()` function. The behavior is actually quite strange:
- If a user is logged in during package installation, the session_setup function will run correctly for that user only, after the package is installed. However, it will not run when other users log in.
- If no user is logged in, after installing the package and logging into the machine, the function does not execute (although I did see the WAPT icon briefly appear in the taskbar during login). However, if I open a command prompt and run `wapt-get session-setup "package name"`, the `session-setup` function then executes without any problem! I don't understand why it doesn't execute automatically at login, whereas it can be executed manually.
In both cases, the behavior is the same as for a user who logs in as either an administrator or a standard user. The behavior is also the same under Windows 11 or Windows 10.
I tried to look at the WAPT agent settings but did not see any settings in the documentation that affect the session-setup function, so I did not notice anything special in the agent settings on the workstations (wapt-get.ini file).
The session_setup() function that is called is as follows:
Code: Select all
def session_setup():
import os
mkdirs(makepath(user_home_directory(),'.arduinoIDE'))
with open(r'C:\cachefileWAPT\arduino-ide\arduino-cli.yaml', "r", encoding='utf-8') as fichier:
data = fichier.read()
data_modified=data.replace('username',os.environ['USERNAME'])
with open(makepath(user_home_directory(),'.arduinoIDE','arduino-cli.yaml'), "w", encoding='utf-8') as fichier:
fichier.write(data_modified)
filecopyto(r'C:\cachefileWAPT\arduino-ide\settings.json',makepath(user_home_directory(),'.arduinoIDE'))
Could you help me solve this problem?
Best regards
