Jump to content

Automation of Nextcloud installer

Recommended Posts

Hello everyone,

i'm trying to automate the installation of Nextcloud Desktop Client (https://download.nextcloud.com/desktop/releases/Windows/latest)

So far i've managed to start the installer with RunAs. Here is an excerpt of my script calling the installer.

_Resource_SaveToFile($tmpDir & "\nc-setup.exe", "BIN_1")
RunWait('CACLS "' & $tmpDir & '\nc-setup.exe" /E /G Administrator:F')
RunWait('CACLS "C:\Users\Backar\Documents\AutoIt\src\NCInstaller\bin\ControlNCInstaller.Exe" /E /G Administrator:F')
RunAs("Administrator", @ComputerName, "Password", 1, '"' & $tmpDir & "\nc-setup.exe" & '"' )
RunAsWait("Administrator", @ComputerName, "Password", 1, 'C:\Users\Backar\Documents\AutoIt\src\NCInstaller\bin\ControlNCInstaller.Exe' )
FileDelete('"' & $tmpDir & "\nc-setup.exe" & '"')

I've got the problem that the installer apparently doesn't react neither to ControlClick() nor to Send("!w") or Send("!W")
But I get the control handle and even its text. Here the script for automating the installer.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

$hWnd = WinWait("Installation von Nextcloud")

$hNextButton = ControlGetHandle("","","[Class:Button;Instance:2]")
$posNexButton = ControlGetPos("","", $hNextButton)
ConsoleWrite(ControlGetText($hWnd, "",$hNextButton) & @CRLF)
ControlClick($hWnd,"", $hNextButton, "left", 1)

As you see from my first code snippet currently i have compiled the control script with #RequireAdministrator because i thought maybe the main script can't interact with it because of running as regular user.

I have also tried including the script in the main script without an additional *.exe

I'm testing it on a Windows 10 build 1903

I've searched the forums for a while and checked the FAQ. Either I could not find hints towards my problem or they were not apparent to me.
I hope you can give me a pointer in which direction i should continue looking to find an explanation for this behaviour.

Share this post

Link to post
Share on other sites

Oh i've forgotten to mention a few points:

  • SciTE V 4.2.0
  • AutoIt V
  • Nextcloud Installer V 2.6.2


Share this post

Link to post
Share on other sites

Hello Subz, thanks for your proposal.

Yes this installs the Client, even removing the old versions from the system!!
I only wonder, where did you find a reference to those parameters? Or did you simply derive them from MSI installers?

Now I will continue to automate the settings for the user.

Again thanks a lot! I hope I'm able to return some help into the forum at some point.

PS: Sorry for the late answer. First i had a meeting and then i experimented a bit with your command line parameters.

Share this post

Link to post
Share on other sites

*sigh* sometimes i'm dumbfounded.

I searched for "command line parameters setup nextcloud" and similar wordings.

Resulting in getting a lot of server side stuff. I guess this topic is done.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...