Page 1 of 1

prompt in session_setup

Published: Dec 9, 2015 - 11:46
by Gildas
Hello,

I'm trying to automate proxy configuration during Node.js installation.
I've created a `session_setup()` method in the `setup.py` file, where I create a `.npmrc` file in the user's home directory and add the `proxy` property, which is of the type:
`proxy=http://`
I would like to create a prompt that asks the user for this information when they click the link:
"configure all packages installed for your session".
Is this possible natively in the setup.py script?

Thanks
, Gildas

Re: Prompt in session_setup

Published: January 6, 2016 - 1:16 AM
by dcardon
Hello Gildas,

the `session_setup()` function in the `setup.py` file runs in the user's session with user privileges and all their settings (environment variables, graphics buffer, lsass.exe session, etc.). To be thorough, I should add that the `install()` function is normally executed by the waptservice as the LOCAL SYSTEM user, so any interaction is prohibited because the windows would be displayed on an invisible graphics buffer.

So technically, yes, you could potentially call a script or executable within `session_setup()` that displays a popup with a few fields to fill in. However, I strongly advise against this. In a standard configuration, `session_setup()` is executed when the user logs in, and displaying a popup at that time is not very user-friendly.

What's preferable in this type of use case is to put a configuration executable/script with a link in the Start menu or directly on the desktop.

Denis

Re: Prompt in session_setup

Published: February 5, 2016 - 1:12 PM
by Gildas
Hello Denis,

thank you for your reply.
I will look into this further.

Gildas