Good morning,
I created a new script this time for the Office 365 installation:
Code: Select all
def install():
if not installed_softwares(u'O365BusinessRetail'):
print('Microsoft Office 365: Installation en cours...')
run(u'OfficeSetup.exe /configure ConfigurationOffice365.xml',timeout=2000,accept_returncodes=[1641,3010,0])
print('Microsoft Office 365: Installation OK')
else:
print('Microsoft Office 365: Deja installe!')
if not isdir(makepath(programefiles,'Microsoft Office','OfficeClickToRunWAPTUninstall')):
mkdirs(makepath(programefiles,'Microsoft Office','OfficeClickToRunWAPTUninstall'))
filecopyto ('OfficeSetup.exe',makepath(programfiles,'Microsoft Office','OfficeClickToRunWAPTUninstall','ConfigurationUninstall.xml'))
def uninstall():
print('Microsoft Office 365: Desinstallation...')
#Closing applications:
killalltasks(['WINWORD.EXE','POWERPNT.EXE','EXCEL.EXE','MSPUB.EXE','MSACCESS.EXE','ONEDRIVE.EXE','OUTLOOK.EXE','ONENOTE.EXE','Teams.exe'])
#Uninstalling:
if installed_softwares(u'O365BusinessRetail'):
if isfile(makepath(programfiles,'Microsoft Office','OfficeClickToRunWAPTUninstall','OfficeSetup.exe')):
run('"' + makepath(programfiles,'Microsoft Office','OfficeClickToRunWAPTUninstall','OfficeSetup.exe') + r'" /configure UninstallOffice365.xml',timeout=2000,accept_returncodes=[1641,3010,0])
remove_file(makepath(programfiles,'Microsoft Office','OfficeClickToRunWAPTUninstall','OfficeSetup.exe'))
remove_file(makepath(programfiles,'Microsoft Office','OfficeClickToRunWAPTUninstall','UninstallOffice365.xml'))
if dir_is_empty(makepath(programfiles,'Microsoft Office','OfficeClickToRunWAPTUninstall')):
remove_tree(makepath(programfiles,'Microsoft Office','OfficeClickToRunWAPTUninstall'))
print('Microsoft Office 365: Desinstallation terminee')
Same as before: no error message, but not the expected result either:
Code: Select all
Command Line : install "c:\waptdev\[...]-microsoft-office_16.0.15225.20288_x64_Windows_PROD\WAPT\.."
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
Installing WAPT files c:\waptdev\[...]-microsoft-office_16.0.15225.20288_x64_Windows_PROD
Installing: OfficeSetup.exe
Installing: OfficeSetup.exe (16.0.15225.20288)
Results :
=== install packages ===
c:\waptdev\[...]-microsoft-office_16.0.15225.20288_x64_Windows_PROD | [...]-microsoft-office (16.0.15225.20288-0)
Since I already have Office installed on my computer, I should at least have received the message "Microsoft Office 365: Already installed!" but nothing happens.
Any ideas?
Thank you in advance.
Sincerely,
Clement