Page 1 of 1

[RESOLVED] - Error Requesting Admin Rights

Published: July 15, 2022 - 5:19 PM
by Geoffroy
Hello,
a Windows environment
with WAPT 2.2.1.

When I try to test the installation of a package, I get an error message saying that the package must be installed with administrator privileges.
How can I use `runas` in the code?

Thank you.

Re: Error Requesting Admin Rights

Published: July 18, 2022 - 1:49 PM
by alain17
Hello,

to my knowledge, this only occurs during testing in PyScripter, not during actual deployment. The `install_msi_if_needed` is sufficient and will be executed correctly by the WAPT agent. Did you start PyScripter as a local administrator? If so, it should work. Have

a good day.

Re: Error Requesting Admin Rights

Published: July 18, 2022 - 2:34 PM
by Geoffroy
Hello and thank you for your reply.

I did indeed launch the console as administrator, but the problem persists.
I also launched only PyScripter as administrator, but the problem persists.
Aside from WAPT and PyScripter, the software installs correctly

. It's the Adobe Creative Cloud suite. I tried bypassing the tests, but it doesn't work on the test machine with the package.

Re: Error Requesting Admin Rights

Published: July 19, 2022 - 10:09 AM
by dcardon
In the PyScripter environment, during the execution of the setup.py script, the Python context, and therefore the `install_msi_if_needed()` command, will inherit the privileges of the parent PyScripter process.
If you have User Account Control (UAC) enabled, you must ensure that PyScripter is launched with elevated privileges.
PyScripter was installed using the package from the Python store or directly from the internet.
The package from the Python store includes an added registry key to require elevated privileges.

Regards,

Denis

Re: Error Requesting Admin Rights

Published: July 19, 2022 - 1:41 PM
by Geoffroy
Thank you for your reply.

So I just started the installation of PyScripter 4, the package from your site.

The installation starts correctly but fails with

a FATAL ERROR: TimeoutExpired: Command '"setup.exe"' timed out after 300 seconds with output ''''.

Where can I increase this time?

Re: Error Requesting Admin Rights

Published: July 19, 2022 - 2:23 PM
by dcardon
Could you try using PyScripter3 instead (uninstall tis-pyscripter4 and install tis-pyscripter3)?

Regards,

Denis

Re: Error Requesting Admin Rights

Published: July 19, 2022 - 2:50 PM
by Geoffroy
Same result with version 3, the WAPT version:

FATAL ERROR: TimeoutExpired: Command '"setup.exe"' timed out after 300 seconds with output '''' These are large packages and it takes more than 5 minutes, how can this constraint be bypassed?

Thank you for your feedback.


===EDIT======

Problem solved.

Install the Pyscripter package correctly on the TANTQUILIT repository.
Then modify the setuphelpers_windows-py file to increase the timeout.


Thanks to the whole team.

Re: [SOLVED] - Error Requesting Admin Rights

Published: July 19, 2022 - 3:32 PM
by dcardon
Do not directly modify the setuphelpers-windows.py file, otherwise the modification will be overwritten by the next update. You can add the timeout as a parameter to the install_msi_if_needed command directly, see https://www.wapt.fr/fr/doc-2.2/wapt-cre ... .html#id17.

Regards,

Denis

(and sorry for my off-topic reply in the last post; I read too quickly. That said, I still recommend sticking with pyscripter3 for your package development; it works better :-) .)

Re: [SOLVED] - Error Requesting Admin Rights

Published: July 20, 2022 - 3:04 PM
by Geoffroy
dcardon wrote: Jul 19, 2022 - 3:32 PM You shouldn't directly modify the setuphelpers-windows.py file, otherwise the change will be overwritten by the next update. You can add the timeout as a parameter to the install_msi_if_needed command directly, see
Thanks for the feedback, it is indeed simpler to integrate it into setup.py.

In any case, everything works.