[RESOLVED] - Error Requesting Admin Rights

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
User avatar
Geoffroy
Messages: 75
Registration: June 28, 2022 - 3:34 PM

July 15, 2022 - 5:19 PM

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.
Last edited by geoffroy on July 19, 2022 - 3:30 PM, edited 1 time.
Server: WAPT Enterprise 2.6.0.17226 on Debian 12;
Consoles: Windows 11
; Infrastructure: Windows
alain17
Messages: 24
Registration: June 17, 2022 - 07:32

July 18, 2022 - 1:49 PM

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.
User avatar
Geoffroy
Messages: 75
Registration: June 28, 2022 - 3:34 PM

July 18, 2022 - 2:34 PM

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.
Server: WAPT Enterprise 2.6.0.17226 on Debian 12;
Consoles: Windows 11
; Infrastructure: Windows
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 19, 2022 - 10:09

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
User avatar
Geoffroy
Messages: 75
Registration: June 28, 2022 - 3:34 PM

July 19, 2022 - 1:41 PM

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?
Server: WAPT Enterprise 2.6.0.17226 on Debian 12;
Consoles: Windows 11
; Infrastructure: Windows
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 19, 2022 - 2:23 PM

Could you try using PyScripter3 instead (uninstall tis-pyscripter4 and install tis-pyscripter3)?

Regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
User avatar
Geoffroy
Messages: 75
Registration: June 28, 2022 - 3:34 PM

July 19, 2022 - 2:50 PM

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.
Server: WAPT Enterprise 2.6.0.17226 on Debian 12;
Consoles: Windows 11
; Infrastructure: Windows
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 19, 2022 - 3:32 PM

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 :-) .)
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
User avatar
Geoffroy
Messages: 75
Registration: June 28, 2022 - 3:34 PM

July 20, 2022 - 3:04 PM

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.
Server: WAPT Enterprise 2.6.0.17226 on Debian 12;
Consoles: Windows 11
; Infrastructure: Windows
Locked