Page 1 of 1

[SOLVED] Microsoft Office 2016 Audit Issue

Published: October 31, 2022 - 2:03 PM
by dj41ph4
Good morning,

I'm having a problem at the end of the Microsoft Office installation

I have this error message in the package audit log

Here's my setup

Code: Select all

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

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def install():
    # Declaring local variables
 
    # Installing the software
    print("Installation Office 2016 VDB")
run('"setup.exe" /adminfile VDB.MSP', timeout = 1200)
        
Here's my mistake

Code: Select all

Auditing OFFICE2016
Audit aborted due to exception: Command '"setup.exe" /adminfile VDB.MSP' returned non-zero exit status 1.
Output:'"setup.exe"' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
Can you help me?

Thank you in advance

Re: Microsoft Office 2016 Audit Problem

Published: October 31, 2022 - 2:25 PM
by t.heroult
Hello
, it seems that this means the agent doesn't know where the setup.exe file is located.
Is it in the package?
In a subfolder of the package, or in the root directory?

Regards,
Tom

Re: Microsoft Office 2016 Audit Problem

Published: November 1, 2022 - 10:24 AM
by dj41ph4
The installation was correct, but there was still an auditing problem

I changed the code and haven't had any problems since

Code: Select all

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

uninstallkey = []
softname = 'Microsoft Office Standard 2016'
pgmsoffice = programfiles



def install():

    if not installed_softwares(softname):
        print('Installation Office 2016')
        cmd = '"setup.exe" /adminfile "silent.msp"'
    else:
        print('Repair and add component to ' + softname)
        cmd = 'msiexec.exe /p silent.msp'

    run(cmd,timeout=1200,accept_returncodes=[1641,3010,0])

    if not installed_softwares(softname):
        error(' %s has been installed but the uninstall key can not be found' % softname)

    #Activation
    pathosppvbs32 = makepath(pgmsoffice,'Microsoft Office','Office16','OSPP.VBS')
    if 'ERROR' in run('cscript "%s" /dstatus'  % pathosppvbs32):
        print("Running activation of " + softname)
        resultact = run('cscript "%s" /act' % pathosppvbs32)

        if 'ERROR' in run('cscript "%s" /dstatus'  % pathosppvbs32):
            error('Activation did not work : ' + resultact)
    else:
        print('Already activated Product')





Re: [SOLVED] Microsoft Office 2016 Audit Problem

Published: November 8, 2022 - 4:41 PM
by dcardon
Thanks dj41ph4 for your feedback,

Denis