Skip to content

Installation fails when server password contains double quote #56

@dkattan

Description

@dkattan

You probably should build up the Arguments using a string array and pass them to Start-Process so it can properly escape them.

$Arguments = @()
$Arguments += "/i"
$Arguments += $InstallerFilePath
$Arguments += "/qn"
if($ServerPassword)
{
   $Arguments += $ServerPassword
}

Start-Process -Wait msiexec -ArgumentList $Arguments

$(If ($ServerPassword -and $ServerPassword -match '.') {"SERVERPASS=""$ServerPassword"""} Else {""}),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions