Page 1 of 1

[Resolved] Nextcloud package

Published: July 15, 2020 - 11:45 AM
by Yoann
Good morning,

A new version of the Nextcloud client is available (2.6.5).

By default, the client indicates the availability of a new version and offers to update it.
To avoid this behavior, it is necessary to add a registry key to disable this check:

Code: Select all

registry_setstring(HKEY_LOCAL_MACHINE, "SOFTWARE\\Policies\\Nextcloud\\Nextcloud", 'skipUpdateCheck', 1, type=REG_DWORD)
This code could be added to the function install of the package available in the TIS repository.

There is currently a problem with the function uninstall in the proposed package:

Code: Select all

run('"%s" %s ' % (makepath(programfiles32,'Nextcloud', 'uninstall.exe'),'/S'))
The Nextcloud client is installed in the directory C:\Program Files\Nextcloud Regardless of the architecture (32 or 64 bits). On a 64-bit machine, therefore, uninstallation does not work.

THANKS,

Sincerely.

Re: Nextcloud package

Published: July 20, 2020 - 3:22 PM
by blemoigne
Good morning,
Thank you for the feedback; the registry key will be added. There was also an oversight in the package: the "key='Nextcloud'" key, which allows for uninstallation, was missing.
Here's what the install and uninstall functions will look like:

Code: Select all

def install():
    version = control.version.split('-')[0]
    print('Installing Nextcloud')
    install_exe_if_needed("Nextcloud-%s-setup.exe" % version,'/S',key='Nextcloud',accept_returncodes=[0,1223])
    registry_setstring(HKEY_LOCAL_MACHINE, "SOFTWARE\\Policies\\Nextcloud\\Nextcloud", 'skipUpdateCheck', 1, type=REG_DWORD)
    print('Nextcloud installed')

def uninstall():
    print('Removing Nextcloud')
    killalltasks('nextcloud.exe')
    registry_deletekey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Policies\\Nextcloud" , "Nextcloud")
    registry_deletekey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Policies" , "Nextcloud")
    if isdir(makepath(programfiles32,"Nextcloud")):
    	remove_tree(makepath(programfiles32,"Nextcloud"))
    

Best regards,
Bertrand

Re: Nextcloud package

Published: July 20, 2020 - 5:16 PM
by Yoann
Hello,

I believe the registry key `key='Nextcloud'` was not specified to perform a silent uninstallation.

Regards.

Re: Nextcloud package

Published: July 22, 2020 - 12:25 PM
by blemoigne
Hello,
I've run further tests on Windows 7 32-bit and 64-bit, as well as Windows 10 64-bit, and everything works perfectly with the code above.
Regards,
Bertrand

Re: Nextcloud package

Published: August 17, 2020 - 12:51
by Yoann
Hello,

OK, thank you.