Custom package installation
Published: May 10, 2022 - 10:31
Hello,
I'm a complete beginner in scripting and WAPT, so I apologize in advance if my questions seem silly.
After several searches, I still can't generate a custom package that requests additional information.
Example: Sketchup installation
PyScripter code:
# -*- coding: utf-8 -*-
from setuphelpers import *
"""
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("Installing: %s" % control.package)
install_exe_if_needed('SketchUpPro-2019-fr.exe',
silentflags='/VERYSILENT',
key='',
#min_version=control.get_software_version(),
)`
When I run "Run Install" from the PyScripter console, the executable launches correctly. However, this page appears and prevents my installation from proceeding silently without my intervention (see attached image).
What I would like is for my script to perform the software installation without requesting any validation (license acceptance, acceptance of additional parameters, etc.).
If I take another piece of software, for example, that I want to deploy, such as NanoCAD, when I run "Run Install" via the PyScripter console, I again encounter a warning message, preventing the installation. (See attached file).
I'm generating the native PyScripter code:
def install():
# Declaring local variables
#run('setup.exe /quiet /i "NCE502000.exe"')
# Installing the software
print("Installing: %s" % control.package)
install_exe_if_needed('NCE502000.exe',
silentflags="/s",
#key='',
min_version=control.get_software_version(),
# min_version="1.2.2.1093",
)
Do I need to add specific options depending on the software? What syntax should I use?
Thank you in advance for your feedback.
I'm a complete beginner in scripting and WAPT, so I apologize in advance if my questions seem silly.
After several searches, I still can't generate a custom package that requests additional information.
Example: Sketchup installation
PyScripter code:
# -*- coding: utf-8 -*-
from setuphelpers import *
"""
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("Installing: %s" % control.package)
install_exe_if_needed('SketchUpPro-2019-fr.exe',
silentflags='/VERYSILENT',
key='',
#min_version=control.get_software_version(),
)`
When I run "Run Install" from the PyScripter console, the executable launches correctly. However, this page appears and prevents my installation from proceeding silently without my intervention (see attached image).
What I would like is for my script to perform the software installation without requesting any validation (license acceptance, acceptance of additional parameters, etc.).
If I take another piece of software, for example, that I want to deploy, such as NanoCAD, when I run "Run Install" via the PyScripter console, I again encounter a warning message, preventing the installation. (See attached file).
I'm generating the native PyScripter code:
def install():
# Declaring local variables
#run('setup.exe /quiet /i "NCE502000.exe"')
# Installing the software
print("Installing: %s" % control.package)
install_exe_if_needed('NCE502000.exe',
silentflags="/s",
#key='',
min_version=control.get_software_version(),
# min_version="1.2.2.1093",
)
Do I need to add specific options depending on the software? What syntax should I use?
Thank you in advance for your feedback.