-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a11bea
commit 34b4dc8
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> | ||
<metadata> | ||
<id>hp-oa-cmdlets</id> | ||
<version>1.1.0.701</version> | ||
<title>HP Onboard Administrator Cmdlets for Windows PowerShell</title> | ||
<authors>Hewlett Packard Enterprise</authors> | ||
<owners>Sebastian Werner</owners> | ||
<projectUrl>http://www.hp.com/go/powershell</projectUrl> | ||
<iconUrl>https://cdn.rawgit.com/fiveninezero/chocolatey-packages/master/icons/hp-oa-cmdlets.png</iconUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>Scripting Tools for Windows PowerShell : OA Cmdlets create an interface to HPE Onboard Administrator(OA). These cmdlets can be used to get and set OA settings in HPE BladeSystem c3000 and c7000 Enclosures.</description> | ||
<summary>HP Onboard Administrator Cmdlets for Windows PowerShell</summary> | ||
<copyright>© 2015 Hewlett-Packard Development Company, L.P.</copyright> | ||
<tags>HP OA PowerShell admin</tags> | ||
<packageSourceUrl>https://github.com/TheWeirdMachine/chocolatey-packages</packageSourceUrl> | ||
<docsUrl>http://h17007.www1.hp.com/us/en/enterprise/servers/solutions/info-library/index.aspx?cat=scripting_tools_powershell#.U6OAv3ZpdV0</docsUrl> | ||
</metadata> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
$ErrorActionPreference = 'Stop'; # stop on all errors | ||
|
||
$packageName = 'hp-oa-cmdlets' | ||
$url = 'https://downloads.hpe.com/pub/softlib2/software1/pubsw-windows/p157797746/v125056/HPOACmdlets-x86.exe' | ||
$url64 = 'https://downloads.hpe.com/pub/softlib2/software1/pubsw-windows/p667675183/v125054/HPOACmdlets-x64.exe' | ||
$checksum = 'FB9205CBB3477F3A0E9DBD56A7DAAE54A38ED84A52D80FEA5E44AD0BF105B56A' | ||
$checksum64 = 'A66D300920464A8A7F9BF11E554E88C136180B28E66AF46F48674CFBB166AB81' | ||
$checksumType = 'sha256' | ||
$checksumType64 = 'sha256' | ||
$fileType = 'msi' | ||
$silentArgs = '/quiet' | ||
$dlPkg = "$packageName" + ".exe" | ||
$ValidExitCodes = '0' | ||
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
|
||
if (Get-ProcessorBits 64) { | ||
$file = "HPOACmdlets-x64.msi" | ||
} else { | ||
$file = "HPOACmdlets-x86.msi" | ||
} | ||
|
||
Get-ChocolateyWebFile -PackageName $packageName -FileFullPath "$toolsDir\$dlPkg" -Url $url -Url64 $url64 -checksum $checksum -checksumType $checksumType -checksum64 $checksum64 -checksumType64 $checksumType64 | ||
Get-ChocolateyUnzip -FileFullPath "$toolsDir\$dlPkg" -Destination $toolsDir | ||
Install-ChocolateyInstallPackage $packageName $fileType $silentArgs "$toolsDir\$file" -ValidExitCodes $ValidExitCodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
$ErrorActionPreference = 'Stop'; # stop on all errors | ||
|
||
$packageName = 'hp-oa-cmdlets' | ||
$registryUninstallerKeyName = '{FEA3D3B6-EF5C-4287-A5F0-4A089970C52F}' #ensure this is the value in the registry | ||
$msiProductCodeGuid = '{FEA3D3B6-EF5C-4287-A5F0-4A089970C52F}' | ||
$shouldUninstall = $true | ||
|
||
$local_key = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\$registryUninstallerKeyName" | ||
$local_key6432 = "HKCU:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$registryUninstallerKeyName" | ||
$machine_key = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$registryUninstallerKeyName" | ||
$machine_key6432 = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$registryUninstallerKeyName" | ||
|
||
$file = @($local_key, $local_key6432, $machine_key, $machine_key6432) ` | ||
| ?{ Test-Path $_ } ` | ||
| Get-ItemProperty ` | ||
| Select-Object -ExpandProperty UninstallString | ||
|
||
if ($file -eq $null -or $file -eq '') { | ||
Write-Host "$packageName has already been uninstalled by other means." | ||
$shouldUninstall = $false | ||
} | ||
|
||
$installerType = 'MSI' | ||
$silentArgs = "$msiProductCodeGuid /qn /norestart" | ||
$validExitCodes = @(0, 3010, 1605, 1614, 1641) | ||
$file = '' | ||
|
||
if ($shouldUninstall) { | ||
Uninstall-ChocolateyPackage -PackageName $packageName -FileType $installerType -SilentArgs $silentArgs -validExitCodes $validExitCodes -File $file | ||
} |