[Resolved] Nextcloud package

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
Yoann
Messages: 51
Registration: July 24, 2019 - 09:39

July 15, 2020 - 11:45

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.
Last edited by Yoann on August 17, 2020 - 12:51, edited 1 time.
WAPT Community 1.8
User avatar
blemoigne
Messages: 178
Registration: July 17, 2020 - 11:29

July 20, 2020 - 3:22 PM

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
Yoann
Messages: 51
Registration: July 24, 2019 - 09:39

July 20, 2020 - 5:16 PM

Hello,

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

Regards.
WAPT Community 1.8
User avatar
blemoigne
Messages: 178
Registration: July 17, 2020 - 11:29

July 22, 2020 - 12:25

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
Yoann
Messages: 51
Registration: July 24, 2019 - 09:39

August 17, 2020 - 12:51

Hello,

OK, thank you.
WAPT Community 1.8
Locked