Chocolatey confused about --override parameters
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I'm trying to override the default package parameters but don't manage to get it taken by chocolatey, after some research and syntax studies here below is what I'm triggering, in a powershell prompt.
Looking at the variable InstallArguments
it seems the arguments are taken and properly overwritten, but then when I look at the $silentArgs
the default arguments from the package are taken in the install command, I don't understand where my mistake is, should I add other parameters?
Any input would be much welcome.
InstallArguments='/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'|
[…]
OverrideArguments='True'|NotSilent='False'|
$silentArgs = "/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE"
[…]
Install-ChocolateyInstallPackage "$packageName" "EXE" "$silentArgs" "$setupPath" -validExitCodes @(0, 3010)
Full debug output
PS C:UsersAdministrator> choco install MsSqlServer2014Express --force --noop --debug -o -ia "'/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'"
Chocolatey v0.10.11
Chocolatey is running on Windows v 6.3.9600.0
Command line: "C:ProgramDatachocolateychoco.exe" install MsSqlServer2014Express --force --noop --debug -o -ia "'/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'"
Received arguments: install MsSqlServer2014Express --force --noop --debug -o -ia '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'
The source 'https://chocolatey.org/api/v2/' evaluated to a 'normal' source type
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.
Configuration: CommandName='install'|CacheLocation='c:vagrantSoftschocolatey_temp'|
ContainsLegacyPackageInstalls='True'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://chocolatey.org/api/v2/'|SourceType='normal'|
Debug='True'|Verbose='False'|Trace='False'|Force='True'|Noop='True'|
HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'|
QuietOutput='False'|PromptForConfirmation='False'|
AcceptLicense='False'|
AllowUnofficialBuild='False'|Input='MsSqlServer2014Express'|
AllVersions='False'|SkipPackageInstallProvider='False'|
PackageNames='MsSqlServer2014Express'|Prerelease='False'|
ForceX86='False'|
InstallArguments='/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'|
OverrideArguments='True'|NotSilent='False'|
ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|AllowDowngrade='False'|
ForceDependencies='False'|Information.PlatformType='Windows'|
Information.PlatformVersion='6.3.9600.0'|
Information.PlatformName='Windows Server 2012 R2'|
Information.ChocolateyVersion='0.10.11.0'|
Information.ChocolateyProductVersion='0.10.11'|
Information.FullName='choco, Version=0.10.11.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|
Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.UserName='Administrator'|
Information.UserDomainName='GALAXY'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='False'|Information.IsProcessElevated='True'|
Information.IsLicensedVersion='False'|Information.LicenseType='Foss'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ScriptsCheckLastExitCode='False'|
ListCommand.LocalOnly='False'|
ListCommand.IdOnly='False'|ListCommand.IncludeRegistryPrograms='False'|
ListCommand.PageSize='25'|ListCommand.Exact='False'|
ListCommand.ByIdOnly='False'|ListCommand.ByTagOnly='False'|
ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'|
ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='unknown'|
PinCommand.Command='unknown'|OutdatedCommand.IgnorePinned='False'|
Proxy.BypassOnLocal='True'|
_ Chocolatey:ChocolateyInstallCommand - Noop Mode _
Chocolatey would have used NuGet to install packages (if they are not already installed):
MsSqlServer2014Express
Progress: Downloading MsSqlServer2014Express 12.2.5000.20170905... 100%
[NuGet] Added file 'ChocolateyInstall.ps1' to folder 'MsSqlServer2014Expresstools'.
[NuGet] Added file 'ChocolateyUninstall.ps1' to folder 'MsSqlServer2014Expresstools'.
[NuGet] Added file 'MsSqlServer2014Express.nuspec' to folder 'MsSqlServer2014Express'.
[NuGet] Added file 'MsSqlServer2014Express.nupkg' to folder 'MsSqlServer2014Express'.
MsSqlServer2014Express v12.2.5000.20170905 (forced) [Approved]
Would have run 'ChocolateyInstall.ps1':
$packageName = "MsSqlServer2014Express"
$chocolateyTempDir = Join-Path (Get-Item $env:TEMP).FullName "chocolatey"
$tempDir = Join-Path $chocolateyTempDir $packageName
$fileFullPath = "$tempDirSQLEXPR.exe"
$extractPath = "$tempDirSQLEXPR"
$setupPath = "$extractPathsetup.exe"
$silentArgs = "/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE"
$url = "https://download.microsoft.com/download/2/A/5/2A5260C3-4143-47D8-9823-E91BB0121F94/SQLEXPR_x86_ENU.exe"
$url64 = "https://download.microsoft.com/download/2/A/5/2A5260C3-4143-47D8-9823-E91BB0121F94/SQLEXPR_x64_ENU.exe"
$checksum = '0eff1354916410437c829e98989e5910d9605b2df31977bc33ca492405a0a9ab'
$checksum64 = 'cc35e94030a24093a62e333e900c2e3c8f1eb253a5d73230a9f5527f1046825b'
# Using the same download location as Install-ChocolateyPackage but need to create the directory first
if (![System.IO.Directory]::Exists($tempDir)) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null }
Get-ChocolateyWebFile $packageName $fileFullPath $url $url64 -Checksum $checksum -Checksum64 $checksum64 -ChecksumType "sha256"
Write-Host "Extracting..."
Start-Process "$fileFullPath" "/Q /x:`"$extractPath`"" -Wait
Write-Host "Installing..."
Install-ChocolateyInstallPackage "$packageName" "EXE" "$silentArgs" "$setupPath" -validExitCodes @(0, 3010)
Write-Host "Removing extracted files..."
rm -r "$extractPath"
Exiting with 0
windows powershell chocolatey
add a comment |
I'm trying to override the default package parameters but don't manage to get it taken by chocolatey, after some research and syntax studies here below is what I'm triggering, in a powershell prompt.
Looking at the variable InstallArguments
it seems the arguments are taken and properly overwritten, but then when I look at the $silentArgs
the default arguments from the package are taken in the install command, I don't understand where my mistake is, should I add other parameters?
Any input would be much welcome.
InstallArguments='/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'|
[…]
OverrideArguments='True'|NotSilent='False'|
$silentArgs = "/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE"
[…]
Install-ChocolateyInstallPackage "$packageName" "EXE" "$silentArgs" "$setupPath" -validExitCodes @(0, 3010)
Full debug output
PS C:UsersAdministrator> choco install MsSqlServer2014Express --force --noop --debug -o -ia "'/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'"
Chocolatey v0.10.11
Chocolatey is running on Windows v 6.3.9600.0
Command line: "C:ProgramDatachocolateychoco.exe" install MsSqlServer2014Express --force --noop --debug -o -ia "'/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'"
Received arguments: install MsSqlServer2014Express --force --noop --debug -o -ia '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'
The source 'https://chocolatey.org/api/v2/' evaluated to a 'normal' source type
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.
Configuration: CommandName='install'|CacheLocation='c:vagrantSoftschocolatey_temp'|
ContainsLegacyPackageInstalls='True'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://chocolatey.org/api/v2/'|SourceType='normal'|
Debug='True'|Verbose='False'|Trace='False'|Force='True'|Noop='True'|
HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'|
QuietOutput='False'|PromptForConfirmation='False'|
AcceptLicense='False'|
AllowUnofficialBuild='False'|Input='MsSqlServer2014Express'|
AllVersions='False'|SkipPackageInstallProvider='False'|
PackageNames='MsSqlServer2014Express'|Prerelease='False'|
ForceX86='False'|
InstallArguments='/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'|
OverrideArguments='True'|NotSilent='False'|
ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|AllowDowngrade='False'|
ForceDependencies='False'|Information.PlatformType='Windows'|
Information.PlatformVersion='6.3.9600.0'|
Information.PlatformName='Windows Server 2012 R2'|
Information.ChocolateyVersion='0.10.11.0'|
Information.ChocolateyProductVersion='0.10.11'|
Information.FullName='choco, Version=0.10.11.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|
Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.UserName='Administrator'|
Information.UserDomainName='GALAXY'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='False'|Information.IsProcessElevated='True'|
Information.IsLicensedVersion='False'|Information.LicenseType='Foss'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ScriptsCheckLastExitCode='False'|
ListCommand.LocalOnly='False'|
ListCommand.IdOnly='False'|ListCommand.IncludeRegistryPrograms='False'|
ListCommand.PageSize='25'|ListCommand.Exact='False'|
ListCommand.ByIdOnly='False'|ListCommand.ByTagOnly='False'|
ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'|
ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='unknown'|
PinCommand.Command='unknown'|OutdatedCommand.IgnorePinned='False'|
Proxy.BypassOnLocal='True'|
_ Chocolatey:ChocolateyInstallCommand - Noop Mode _
Chocolatey would have used NuGet to install packages (if they are not already installed):
MsSqlServer2014Express
Progress: Downloading MsSqlServer2014Express 12.2.5000.20170905... 100%
[NuGet] Added file 'ChocolateyInstall.ps1' to folder 'MsSqlServer2014Expresstools'.
[NuGet] Added file 'ChocolateyUninstall.ps1' to folder 'MsSqlServer2014Expresstools'.
[NuGet] Added file 'MsSqlServer2014Express.nuspec' to folder 'MsSqlServer2014Express'.
[NuGet] Added file 'MsSqlServer2014Express.nupkg' to folder 'MsSqlServer2014Express'.
MsSqlServer2014Express v12.2.5000.20170905 (forced) [Approved]
Would have run 'ChocolateyInstall.ps1':
$packageName = "MsSqlServer2014Express"
$chocolateyTempDir = Join-Path (Get-Item $env:TEMP).FullName "chocolatey"
$tempDir = Join-Path $chocolateyTempDir $packageName
$fileFullPath = "$tempDirSQLEXPR.exe"
$extractPath = "$tempDirSQLEXPR"
$setupPath = "$extractPathsetup.exe"
$silentArgs = "/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE"
$url = "https://download.microsoft.com/download/2/A/5/2A5260C3-4143-47D8-9823-E91BB0121F94/SQLEXPR_x86_ENU.exe"
$url64 = "https://download.microsoft.com/download/2/A/5/2A5260C3-4143-47D8-9823-E91BB0121F94/SQLEXPR_x64_ENU.exe"
$checksum = '0eff1354916410437c829e98989e5910d9605b2df31977bc33ca492405a0a9ab'
$checksum64 = 'cc35e94030a24093a62e333e900c2e3c8f1eb253a5d73230a9f5527f1046825b'
# Using the same download location as Install-ChocolateyPackage but need to create the directory first
if (![System.IO.Directory]::Exists($tempDir)) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null }
Get-ChocolateyWebFile $packageName $fileFullPath $url $url64 -Checksum $checksum -Checksum64 $checksum64 -ChecksumType "sha256"
Write-Host "Extracting..."
Start-Process "$fileFullPath" "/Q /x:`"$extractPath`"" -Wait
Write-Host "Installing..."
Install-ChocolateyInstallPackage "$packageName" "EXE" "$silentArgs" "$setupPath" -validExitCodes @(0, 3010)
Write-Host "Removing extracted files..."
rm -r "$extractPath"
Exiting with 0
windows powershell chocolatey
add a comment |
I'm trying to override the default package parameters but don't manage to get it taken by chocolatey, after some research and syntax studies here below is what I'm triggering, in a powershell prompt.
Looking at the variable InstallArguments
it seems the arguments are taken and properly overwritten, but then when I look at the $silentArgs
the default arguments from the package are taken in the install command, I don't understand where my mistake is, should I add other parameters?
Any input would be much welcome.
InstallArguments='/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'|
[…]
OverrideArguments='True'|NotSilent='False'|
$silentArgs = "/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE"
[…]
Install-ChocolateyInstallPackage "$packageName" "EXE" "$silentArgs" "$setupPath" -validExitCodes @(0, 3010)
Full debug output
PS C:UsersAdministrator> choco install MsSqlServer2014Express --force --noop --debug -o -ia "'/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'"
Chocolatey v0.10.11
Chocolatey is running on Windows v 6.3.9600.0
Command line: "C:ProgramDatachocolateychoco.exe" install MsSqlServer2014Express --force --noop --debug -o -ia "'/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'"
Received arguments: install MsSqlServer2014Express --force --noop --debug -o -ia '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'
The source 'https://chocolatey.org/api/v2/' evaluated to a 'normal' source type
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.
Configuration: CommandName='install'|CacheLocation='c:vagrantSoftschocolatey_temp'|
ContainsLegacyPackageInstalls='True'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://chocolatey.org/api/v2/'|SourceType='normal'|
Debug='True'|Verbose='False'|Trace='False'|Force='True'|Noop='True'|
HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'|
QuietOutput='False'|PromptForConfirmation='False'|
AcceptLicense='False'|
AllowUnofficialBuild='False'|Input='MsSqlServer2014Express'|
AllVersions='False'|SkipPackageInstallProvider='False'|
PackageNames='MsSqlServer2014Express'|Prerelease='False'|
ForceX86='False'|
InstallArguments='/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'|
OverrideArguments='True'|NotSilent='False'|
ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|AllowDowngrade='False'|
ForceDependencies='False'|Information.PlatformType='Windows'|
Information.PlatformVersion='6.3.9600.0'|
Information.PlatformName='Windows Server 2012 R2'|
Information.ChocolateyVersion='0.10.11.0'|
Information.ChocolateyProductVersion='0.10.11'|
Information.FullName='choco, Version=0.10.11.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|
Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.UserName='Administrator'|
Information.UserDomainName='GALAXY'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='False'|Information.IsProcessElevated='True'|
Information.IsLicensedVersion='False'|Information.LicenseType='Foss'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ScriptsCheckLastExitCode='False'|
ListCommand.LocalOnly='False'|
ListCommand.IdOnly='False'|ListCommand.IncludeRegistryPrograms='False'|
ListCommand.PageSize='25'|ListCommand.Exact='False'|
ListCommand.ByIdOnly='False'|ListCommand.ByTagOnly='False'|
ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'|
ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='unknown'|
PinCommand.Command='unknown'|OutdatedCommand.IgnorePinned='False'|
Proxy.BypassOnLocal='True'|
_ Chocolatey:ChocolateyInstallCommand - Noop Mode _
Chocolatey would have used NuGet to install packages (if they are not already installed):
MsSqlServer2014Express
Progress: Downloading MsSqlServer2014Express 12.2.5000.20170905... 100%
[NuGet] Added file 'ChocolateyInstall.ps1' to folder 'MsSqlServer2014Expresstools'.
[NuGet] Added file 'ChocolateyUninstall.ps1' to folder 'MsSqlServer2014Expresstools'.
[NuGet] Added file 'MsSqlServer2014Express.nuspec' to folder 'MsSqlServer2014Express'.
[NuGet] Added file 'MsSqlServer2014Express.nupkg' to folder 'MsSqlServer2014Express'.
MsSqlServer2014Express v12.2.5000.20170905 (forced) [Approved]
Would have run 'ChocolateyInstall.ps1':
$packageName = "MsSqlServer2014Express"
$chocolateyTempDir = Join-Path (Get-Item $env:TEMP).FullName "chocolatey"
$tempDir = Join-Path $chocolateyTempDir $packageName
$fileFullPath = "$tempDirSQLEXPR.exe"
$extractPath = "$tempDirSQLEXPR"
$setupPath = "$extractPathsetup.exe"
$silentArgs = "/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE"
$url = "https://download.microsoft.com/download/2/A/5/2A5260C3-4143-47D8-9823-E91BB0121F94/SQLEXPR_x86_ENU.exe"
$url64 = "https://download.microsoft.com/download/2/A/5/2A5260C3-4143-47D8-9823-E91BB0121F94/SQLEXPR_x64_ENU.exe"
$checksum = '0eff1354916410437c829e98989e5910d9605b2df31977bc33ca492405a0a9ab'
$checksum64 = 'cc35e94030a24093a62e333e900c2e3c8f1eb253a5d73230a9f5527f1046825b'
# Using the same download location as Install-ChocolateyPackage but need to create the directory first
if (![System.IO.Directory]::Exists($tempDir)) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null }
Get-ChocolateyWebFile $packageName $fileFullPath $url $url64 -Checksum $checksum -Checksum64 $checksum64 -ChecksumType "sha256"
Write-Host "Extracting..."
Start-Process "$fileFullPath" "/Q /x:`"$extractPath`"" -Wait
Write-Host "Installing..."
Install-ChocolateyInstallPackage "$packageName" "EXE" "$silentArgs" "$setupPath" -validExitCodes @(0, 3010)
Write-Host "Removing extracted files..."
rm -r "$extractPath"
Exiting with 0
windows powershell chocolatey
I'm trying to override the default package parameters but don't manage to get it taken by chocolatey, after some research and syntax studies here below is what I'm triggering, in a powershell prompt.
Looking at the variable InstallArguments
it seems the arguments are taken and properly overwritten, but then when I look at the $silentArgs
the default arguments from the package are taken in the install command, I don't understand where my mistake is, should I add other parameters?
Any input would be much welcome.
InstallArguments='/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'|
[…]
OverrideArguments='True'|NotSilent='False'|
$silentArgs = "/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE"
[…]
Install-ChocolateyInstallPackage "$packageName" "EXE" "$silentArgs" "$setupPath" -validExitCodes @(0, 3010)
Full debug output
PS C:UsersAdministrator> choco install MsSqlServer2014Express --force --noop --debug -o -ia "'/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'"
Chocolatey v0.10.11
Chocolatey is running on Windows v 6.3.9600.0
Command line: "C:ProgramDatachocolateychoco.exe" install MsSqlServer2014Express --force --noop --debug -o -ia "'/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'"
Received arguments: install MsSqlServer2014Express --force --noop --debug -o -ia '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'
The source 'https://chocolatey.org/api/v2/' evaluated to a 'normal' source type
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.
Configuration: CommandName='install'|CacheLocation='c:vagrantSoftschocolatey_temp'|
ContainsLegacyPackageInstalls='True'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://chocolatey.org/api/v2/'|SourceType='normal'|
Debug='True'|Verbose='False'|Trace='False'|Force='True'|Noop='True'|
HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'|
QuietOutput='False'|PromptForConfirmation='False'|
AcceptLicense='False'|
AllowUnofficialBuild='False'|Input='MsSqlServer2014Express'|
AllVersions='False'|SkipPackageInstallProvider='False'|
PackageNames='MsSqlServer2014Express'|Prerelease='False'|
ForceX86='False'|
InstallArguments='/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT'|
OverrideArguments='True'|NotSilent='False'|
ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|AllowDowngrade='False'|
ForceDependencies='False'|Information.PlatformType='Windows'|
Information.PlatformVersion='6.3.9600.0'|
Information.PlatformName='Windows Server 2012 R2'|
Information.ChocolateyVersion='0.10.11.0'|
Information.ChocolateyProductVersion='0.10.11'|
Information.FullName='choco, Version=0.10.11.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|
Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.UserName='Administrator'|
Information.UserDomainName='GALAXY'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='False'|Information.IsProcessElevated='True'|
Information.IsLicensedVersion='False'|Information.LicenseType='Foss'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ScriptsCheckLastExitCode='False'|
ListCommand.LocalOnly='False'|
ListCommand.IdOnly='False'|ListCommand.IncludeRegistryPrograms='False'|
ListCommand.PageSize='25'|ListCommand.Exact='False'|
ListCommand.ByIdOnly='False'|ListCommand.ByTagOnly='False'|
ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'|
ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='unknown'|
PinCommand.Command='unknown'|OutdatedCommand.IgnorePinned='False'|
Proxy.BypassOnLocal='True'|
_ Chocolatey:ChocolateyInstallCommand - Noop Mode _
Chocolatey would have used NuGet to install packages (if they are not already installed):
MsSqlServer2014Express
Progress: Downloading MsSqlServer2014Express 12.2.5000.20170905... 100%
[NuGet] Added file 'ChocolateyInstall.ps1' to folder 'MsSqlServer2014Expresstools'.
[NuGet] Added file 'ChocolateyUninstall.ps1' to folder 'MsSqlServer2014Expresstools'.
[NuGet] Added file 'MsSqlServer2014Express.nuspec' to folder 'MsSqlServer2014Express'.
[NuGet] Added file 'MsSqlServer2014Express.nupkg' to folder 'MsSqlServer2014Express'.
MsSqlServer2014Express v12.2.5000.20170905 (forced) [Approved]
Would have run 'ChocolateyInstall.ps1':
$packageName = "MsSqlServer2014Express"
$chocolateyTempDir = Join-Path (Get-Item $env:TEMP).FullName "chocolatey"
$tempDir = Join-Path $chocolateyTempDir $packageName
$fileFullPath = "$tempDirSQLEXPR.exe"
$extractPath = "$tempDirSQLEXPR"
$setupPath = "$extractPathsetup.exe"
$silentArgs = "/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE"
$url = "https://download.microsoft.com/download/2/A/5/2A5260C3-4143-47D8-9823-E91BB0121F94/SQLEXPR_x86_ENU.exe"
$url64 = "https://download.microsoft.com/download/2/A/5/2A5260C3-4143-47D8-9823-E91BB0121F94/SQLEXPR_x64_ENU.exe"
$checksum = '0eff1354916410437c829e98989e5910d9605b2df31977bc33ca492405a0a9ab'
$checksum64 = 'cc35e94030a24093a62e333e900c2e3c8f1eb253a5d73230a9f5527f1046825b'
# Using the same download location as Install-ChocolateyPackage but need to create the directory first
if (![System.IO.Directory]::Exists($tempDir)) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null }
Get-ChocolateyWebFile $packageName $fileFullPath $url $url64 -Checksum $checksum -Checksum64 $checksum64 -ChecksumType "sha256"
Write-Host "Extracting..."
Start-Process "$fileFullPath" "/Q /x:`"$extractPath`"" -Wait
Write-Host "Installing..."
Install-ChocolateyInstallPackage "$packageName" "EXE" "$silentArgs" "$setupPath" -validExitCodes @(0, 3010)
Write-Host "Removing extracted files..."
rm -r "$extractPath"
Exiting with 0
windows powershell chocolatey
windows powershell chocolatey
edited Jan 3 at 9:47
James C.
9,12622233
9,12622233
asked Jan 3 at 5:16


Matthieu DucorpsMatthieu Ducorps
64110
64110
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
My understanding is it because of the noop
mode where the variable are not fully updated like is done when you run it for real, you will get this feedback which shows the parameters are effectively overwritten.
Overriding package arguments with '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT' (replacing '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE')
hope that help.
Matth
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54016706%2fchocolatey-confused-about-override-parameters%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
My understanding is it because of the noop
mode where the variable are not fully updated like is done when you run it for real, you will get this feedback which shows the parameters are effectively overwritten.
Overriding package arguments with '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT' (replacing '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE')
hope that help.
Matth
add a comment |
My understanding is it because of the noop
mode where the variable are not fully updated like is done when you run it for real, you will get this feedback which shows the parameters are effectively overwritten.
Overriding package arguments with '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT' (replacing '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE')
hope that help.
Matth
add a comment |
My understanding is it because of the noop
mode where the variable are not fully updated like is done when you run it for real, you will get this feedback which shows the parameters are effectively overwritten.
Overriding package arguments with '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT' (replacing '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE')
hope that help.
Matth
My understanding is it because of the noop
mode where the variable are not fully updated like is done when you run it for real, you will get this feedback which shows the parameters are effectively overwritten.
Overriding package arguments with '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /UPDATEENABLED=FALSE /FEATURES=SQL,TOOLS,FULLTEXT' (replacing '/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE')
hope that help.
Matth
answered Jan 3 at 5:39


Matthieu DucorpsMatthieu Ducorps
64110
64110
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54016706%2fchocolatey-confused-about-override-parameters%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown