Page 1 of 2

[RESOLVED] General question about packages

Published: May 7, 2020 - 5:10 PM
by Alexis83
Hello,

I discovered the WAPT solution some time ago and I'm planning to do a proof of concept (POC).
I haven't found the answer (perhaps I haven't searched properly...).

I'd like to know if WAPT packages automatically replace software installed on a PC.
For example, if Firefox is installed on a PC, will the package pushed by WAPT uninstall the previously installed version of Firefox?

Thank you for your answers!

Re: General question about packages

Published: May 11, 2020 - 10:16 AM
by florentR2
Hello,
it all depends on how you configure your package.
If you use the `install exe if needed` option with the `min version` parameter, it will only install if the already installed version is older.

Re: General question about packages

Published: May 11, 2020 - 11:12
by florentR2
After a few tests, I confess I don't understand how min_version works

For example, I installed Firefox 76.0, then created a package with an older version 71 like this:

Code: Select all

    install_exe_if_needed("Firefox Setup 71.0.exe",'-ms',key='Mozilla Firefox 71.0 (x64 fr)',min_version='71.0')
or that

Code: Select all

 install_exe_if_needed("Firefox Setup 71.0.exe",'-ms',key='Mozilla Firefox 71.0 (x64 fr)',min_version='71.0')
The package is reinstalling itself over version 76 when it shouldn't.
Did I miss something?

Re: General question about packages

Published: May 11, 2020 - 11:37
by vcardon
florentR2 wrote: May 11, 2020 - 11:12 The package is reinstalling over version 76 when it shouldn't.
Did I miss something?
In your situation, WAPT worked as expected: you requested to install version 71 as a replacement for version 76.

install_exe_if_needed will install a newer version of your software if the version on your machine is older.

If the version on your machine is the same as the package version, then the package will only report to the server that your software is up to date without installing it, because the operation will have been rendered unnecessary.

Vincent

Re: General question about packages

Published: May 11, 2020 - 11:42
by florentR2
install_exe_if_needed will install a newer version of your software if the version on your machine is older.
In my test, I already have version 76 installed.
The version of the WAPT package being 71 It's older and shouldn't be installed?

Or do we need to proceed differently so that it doesn't install an older version over a newer one?

Re: General question about packages

Published: May 11, 2020 - 2:11 PM
by Alexis83
Thanks for the replies.
So it seems possible :)

Re: General question about packages

Published: May 11, 2020 - 2:38 PM
by sfonteneau
For Firefox, it's a bit different.

The Firefox uninstall key contains the Firefox version number.

So if the software's uninstall key isn't present, then the installation is restarted!

Re: General question about packages

Published: May 11, 2020 - 3:28 PM
by florentR2
Okay, noted.
Here's how I get around this, for example, with version 76 already installed

Code: Select all

    softname ='Mozilla Firefox'
    listFF=installed_softwares(softname)
    #print(listFF[0]['version'])

    versionInstalled=listFF[0]['version']
    versionPackage='71.0'

    if versionInstalled >= versionPackage:
        print('version installée supérieur a celle du package')
    else:
        install_exe_if_needed("Firefox Setup 71.0.exe",'-ms',key='',min_version='71.0')

Re: General question about packages

Published: May 11, 2020 - 3:30 PM
by sfonteneau
Absolutely, but the uninstallkey is still necessary ;)

Re: General question about packages

Published: May 11, 2020 - 3:42 PM
by florentR2
sfonteneau wrote: May 11, 2020 - 3:30 PM Absolutely, but the uninstallkey is still necessary ;)
Is this necessary for WAPT to consider that the software has been installed correctly?
Or just advice on how to uninstall via WAPT if needed?