Code : Tout sélectionner
softname = 'Microsoft Office Standard 2007'
check_installed_soft = installed_softwares(softname)
if check_installed_soft:
run('%programfiles%\Microsoft Office 2007\uninstall.exe')
Code : Tout sélectionner
softname = 'Microsoft Office Standard 2007'
check_installed_soft = installed_softwares(softname)
if check_installed_soft:
run('%programfiles%\Microsoft Office 2007\uninstall.exe')
Code : Tout sélectionner
uninstallstring =['"%s\Common Files\microsoft shared\OFFICE12\Office Setup Controller\Setup.exe" /uninstall Standard /config "%s\Common Files\uninstall.xml"' % (programfiles32,programfiles32) ]
def install():
softname = 'Microsoft Office Professionnal Plus 2007'
softname_2 = 'Microsoft Office Standard 2007'
check_installed = installed_softwares(softname)
check_installed_2 = installed_softwares(softname_2)
if check_installed_2:
print('la version standard est installée')
else:
print('Copie des fichiers uninstall')
filecopyto("uninstall.xml",os.path.join(programfiles32,"Common Files"))
filecopyto("uninstall_pro.xml",os.path.join(programfiles32,"Common Files"))
run('"C:\Program Files (x86)\Common Files\microsoft shared\OFFICE12\Office Setup Controller\Setup.exe" /uninstall ProPlus /config "C:\Program Files (x86)\Common Files\uninstall_pro.xml"')
print('Installation du paquet aiz-office2007_std (office12)')
cmd ='"setup.exe" /adminfile "install.MSP"'
run(cmd,timeout=1200,accept_returncodes=[1641,3010,0])
print('Fin installation')