Let me give you the example of my latest package for installing the Archiwizard v8.0.1 software:
This is an MSI file; the setup returns the wrong uninstallkey, so we can forget about the install_msi_if_needed command...
The MSI file only installs silently under the administrator account, so we can forget about the `run` command since a package is executed under the system account...
To bypass all these problems, from the system account it's possible to run a process as administrator in PowerShell without having to provide the password! And the best part is that when you provide the correct uninstallkey in the package retrieved with the command "wapt-get list-registry archiwizard", the application uninstall works correctly.
Here is the code for my package:
Code: Select all
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = ['{AF474B4B-28ED-4AAE-A623-BB78E4D4AEC7}']
def install():
print('installing wapt-archiwizard')
run_powershell('Start-Process msiexec.exe -Wait -ArgumentList "/I %s\ArchiWIZARD-2020-x64(8.0.1).msi /quiet" -verb runAs' % basedir)
