Quantcast
Channel: Red Gate forums: SQL Backup 7
Viewing all articles
Browse latest Browse all 713

Unattended install fails silently, inconsistently

$
0
0
Hey RG,

I'm trying to perform an unattended install on a remote computer of the SQL Backup server components, version 7.7.0.7.

The documentation for installing the server components from the command line makes it look easy.

Quote:

To install the server components unattended, call SQBServerSetup.exe from the command line with /VERYSILENT and /SUPPRESSMESSAGEBOXES. For example:

Code:

SQBServerSetup.exe /VERYSILENT /SUPPRESSMSGBOXES


The server components will be installed on the local instance using the default settings unless you specify otherwise using the parameters described below.


I've tried to run this command in four different ways, but they all fail. The error varies depending on the method.

Is it a problem with the installer, or is there something missing from the documentaton?

Here's what I've tried.

1. PowerShell remote session

First I tried the Invoke-Command cmdlet to install over a PowerShell remote session.

Code:

  Write-Verbose "Installing SQL Backup"
  Invoke-Command $TargetServer {
    G:\media\SQBServerSetup.exe /VERYSILENT /SUPPRESSMSGBOXES
    $LASTEXITCODE
  }


I copied the installer to G:\media on the remote computer before running the command.

The variable $TargetServer contains the name of the remote server.

It returns instantly without a value.The $LASTEXITCODE variable is null.

2. psexec

Next I tried psexec.

Code:
psexec \\$TargetServer G:\media\SQBServerSetup.exe /VERYSILENT /SUPPRESSMSGBOXES


It didn't work either, but it at least gave me some output.

Code:

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
Connecting to REMOTESERVER...Starting PsExec service on REMOTESERVER...Connecting with PsExec service on REMOTESERVER...Starting
G:\media\SQBServerSetup.exe on REMOTESERVER...
G:\media\SQBServerSetup.exe exited on REMOTESERVER with error code 6040.


Error code 6040 means "The password for the SQL Backup Agent service user account was invalid."

I haven't specified a user account. SQL Backup is supposed to use the SQL Server service account!

3. PowerShell over RDP

To rule out any weirdness caused by the remote execution, I opened an RDP connection and tried the PowerShell commands again.

Code:

PS G:\media> .\SQBServerSetup.exe /VERYSILENT /SUPPRESSMSGBOXES
PS G:\media> $LASTEXITCODE


Again, the command returned instantly and produced no output or exit code.

4. cmd over RDP

Maybe the installer just doesn't work in PowerShell.

Does it work in plain old cmd?

Code:

G:\media>.\SQBServerSetup.exe /VERYSILENT /SUPPRESSMSGBOXES
G:\media>echo %errorlevel%
9009


No. And error code 9009 is sadly undocumented.

How do I make this work?

Cheers,
Iain

Viewing all articles
Browse latest Browse all 713

Trending Articles