Page 1 of 1

Problem deploying package as administrator

Published: May 1, 2021 - 9:51 AM
by Eric
Hello,
version 1.8.2.72767.
I want to install a package for an EBP management software suite for my business. The vendor gave me a command line:
`EBPOL_2020_LigneOL_Compta_12_3_1_8211.exe /s NETWORK=TRUE PERSONALIZED=TRUE WEBCHECKED=FALSE`.

When I install it with this command: `run(r'EBPOL_2020_LigneOL_Compta_12_3_1_8211.exe /s NETWORK=TRUE PERSONALIZED=TRUE WEBCHECKED=FALSE')

`, it doesn't work with the system account. Indeed, from the PyScripter console, the installation works if I'm logged in as administrator, but if I deploy it with the system account, it doesn't work.
I've set the Waptservice to .\administrator, and that works. But after reading various forum posts, this raises a security concern, and furthermore, I have to run it on all the machines (approximately 250 machines, which is tedious).

In addition, I can't get the command `run_as_admin(r'EBPOL_2020_LigneOL_Compta_12_3_1_8211.exe /s NETWORK=TRUE PERSONALIZED=TRUE WEBCHECKED=FALSE') to work. PyScripter returns an error every time.
Command line: install "c:\waptdev\ader-test-wapt\WAPT\.."
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
Installing WAPT files c:\waptdev\ader-test-wapt
2021-05-01 09:18:40,750 CRITICAL Fatal error in install script: TypeError: running_as_admin() takes no arguments (1 given):
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\common.py", line 3876, in install_wapt
exitstatus = setup.install()
File "c:\waptdev\ader-test-wapt\setup.py", line 9, in install
running_as_admin('EBPOL_2020_LigneOL_Compta_12_3_1_8211.exe')
TypeError: running_as_admin() takes no arguments (1 given)

FATAL ERROR: TypeError: running_as_admin() takes no arguments (1 given)




only if this could solve my problem. Finally, the run_as_administrator command doesn't exist as mentioned in some posts?

Thank you very much for your help,
Eric

Re: Problem deploying package as administrator

Published: May 18, 2021 - 3:38 PM
by dcardon
The printing function (i.e., the equivalent of sudo in Linux) is quite temperamental in Windows. A fairly deterministic option is to create a scheduled task to run immediately, but frankly, it would be much easier to have a working sudo command...