[SOLVED] Run as administrator without a password (when the system account isn't sufficient) \o/

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
florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

June 15, 2020 - 11:25

sfonteneau wrote: Apr 30, 2020 - 2:48 PM Can you try using the run_as_administrator function?

Code: Select all

from common import run_as_administrator

run_as_administrator('sample.exe','--args')
Good morning,
I had high hopes but it doesn't work with all packages that do not support installation under SYSTEM account.
For example, EBP, which includes SQL Express.
I tried both run_as_administrator and Start-Process, both with an MSI and an EXE file
Damage
olaplanche
Messages: 178
Registration: January 26, 2017 - 11:11

July 8, 2020 - 5:00 PM

I need to revisit this package sometime because I'm also deploying EPB PGI Education; I'll create a new post if I manage to do anything!
- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

November 15, 2020 - 8:51 AM

Good morning,
Sorry to reply to a resolved message, but I had the same problem with Archicad, so I install it by simply running the MSI file. It's worked that way for us for several years.

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
import time

uninstallkey = ['{6AA0BE64-99F3-4148-ACD4-CAB38B3C69C8}']

def install():
    print('Installation de Archiwizard 2021 9.0.0')
    softname = 'ArchiWIZARD'
    check_installed = installed_softwares(softname)
    if check_installed:
	for uninstall in check_installed:
		key=uninstall['key']
        if installed_softwares(uninstallkey=key
			print('Desinstallation des anciens ArchiWIZARD')
			cmd = WAPT.uninstall_cmd(uninstall['key'])
			run_notfatal(cmd)
			time.sleep(5)
	run('ArchiWIZARD-2021-x64.msi /qn /norestart')
florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

November 16, 2020 - 8:53 AM

Thank you.
Unfortunately, I had already tried all the classic methods without success: run(), install_msi_if_needed(), install_exe_if_needed()
Locked