[SOLVED] Configuration def session-setup

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
Emmanuel64
Messages: 46
Registration: February 23, 2024 - 09:37

May 24, 2024 - 11:58

Good morning

I added a "session-setup" parameter to a package:

Code: Select all

def session_setup():
   filecopyto('v6-gpo-configuration.json',makepath(user_local_appdata(),'UpSignOn'))
When I'm on the DEV console and I run "session-setup" directly, the file transfers correctly. But during package installation, it doesn't work. I tried "wapt-get session-setup -f hasp-UpSignOn", but there was no change

Do you have any idea what my mistake might be?

THANKS
WAPT Enterprise
Version 2.6.1.17576
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

May 28, 2024 - 08:02

Good morning,
I asked pretty much the same question in 2017 ;) Simon's answer is here:

viewtopic.php?t=595
Hello, as indicated in the documentation:

https://www.wapt.fr/fr/doc/CreationPaqu ... sion-setup

, with session_setup, it is not possible to access files contained within the package.

You will need to copy them beforehand to a directory.
Emmanuel64
Messages: 46
Registration: February 23, 2024 - 09:37

May 28, 2024 - 08:52

Thanks gaelds.

I had searched for the answer on the forum, but hadn't managed to find it. :oops:

Have a good day.
WAPT Enterprise
Version 2.6.1.17576
Emmanuel64
Messages: 46
Registration: February 23, 2024 - 09:37

May 30, 2024 - 08:27

Good morning

To close this ticket, and for those who will be looking for an answer

Simon therefore confirms that:
With session_setup, it is not possible to call files contained in the package.
They will need to be copied into a directory beforehand.

For example, in my case:

Code: Select all

def session_setup():
if not isdir(makepath(user_local_appdata,'UpSignOn')):
mkdirs(makepath(user_local_appdata,'UpSignOn'))
filecopyto('C:/Windows/System32/v6-gpo-configuration.json',makepath(user_local_appdata(),'UpSignOn'))

def install():
# Declaring local variables

# Installing the software
print("Installing: UpSignOn-7.7.1-silent-installer.msi")
install_msi_if_needed('UpSignOn-7.7.1-silent-installer.msi' , key = '' ,  min_version = "7.7.1" )
filecopyto('v6-gpo-configuration.json',makepath(system32))
The file will therefore be copied from the local disk to c:/user/xxx/appdata/local/UpSignOn the next time the user logs in

Thanks to gaelds for redirecting me
WAPT Enterprise
Version 2.6.1.17576
Locked