I created a package to install surfer 11 software. In this package I also programmed the option to uninstall old versions before installing the new one.
After running on the client, the command output shows the error below:
Code : Tout sélectionner
Uninstalling old versions of surfer...
CalledProcessErrorOutput: Command [u'"C:\\ProgramData\\{5F3A4BBA-1519-45F2-9BF7-1E9924E32CAA}\\Surfer(11.1.719)_Installer.exe" REMOVE=TRUE MODIFY=FALSE'] returned non-zero exit status 1.
The syntax for the file name, directory name, or volume label is incorrect.
Code : Tout sélectionner
# -*- coding: utf-8 -*-
from setuphelpers import *
import os
uninstallkey = []
destdir = makepath(programfiles, "Golden Software", "Surfer 11", "AppData")
filedir = "%s\\Gradient.ini" % destdir
def install():
print('Uninstalling old versions of surfer...')
for soft in installed_softwares('Surfer'):
try:
run(WAPT.uninstall_cmd(soft['key']))
except ValueError:
print('An error occured on Surfer unninstalling!')
print('Uninstalling old versions of Surfer completed!')
print('installing Surfer')
install_msi_if_needed('surfer.msi')
if os.path.exists(destdir):
filecopyto("Gradient.ini", destdir)
if os.path.exists(filedir):
print("Gradient.ini copiado para %s" % destdir)