diff --git a/HipChat/HipChat.nuspec b/HipChat/HipChat.nuspec
index 603f993..f6b297d 100644
--- a/HipChat/HipChat.nuspec
+++ b/HipChat/HipChat.nuspec
@@ -3,8 +3,7 @@
HipChat
HipChat Client
-
- 1.2.103402
+ 2.2.1164
Atlassian
Ethan J Brown
HipChat is instant messaging built for business.
@@ -20,9 +19,6 @@ Get your team off AIM, Google Talk, and Skype — HipChat was built for business
false
https://github.com/Iristyle/ChocolateyPackages/raw/master/HipChat/HipChat.png
-
-
-
diff --git a/HipChat/tools/chocolateyInstall.ps1 b/HipChat/tools/chocolateyInstall.ps1
index 41569de..bfb56ae 100644
--- a/HipChat/tools/chocolateyInstall.ps1
+++ b/HipChat/tools/chocolateyInstall.ps1
@@ -1,32 +1,14 @@
$package = 'HipChat'
try {
-
- $hipParams = @{
+ $params = @{
PackageName = $package;
- FileFullPath = (Join-Path $Env:TEMP 'hipchat.air');
- Url = 'http://downloads.hipchat.com/hipchat.air'
+ FileType = 'msi';
+ SilentArgs = '/quiet';
+ Url = "https://www.hipchat.com/downloads/latest/qtwindows";
}
- Get-ChocolateyWebFile @hipParams
-
- $airInstall = 'Adobe AIR\Versions\1.0\Adobe AIR Application Installer.exe'
- $airPath = $Env:CommonProgramFiles, ${Env:CommonProgramFiles(x86)} |
- % { Join-Path $_ $airInstall } |
- ? { Test-Path $_ } |
- Select -First 1
-
- if (!$airPath)
- {
- Write-ChocolateyFailure $package 'Could not find AIR installer!'
- return
- }
-
- $installPath = Join-Path $Env:ProgramFiles 'Hipchat'
- $airParams = @('-silent', '-eulaAccepted', '-programMenu',
- '-location', "`"$installPath`"", "`"$($hipParams.FileFullPath)`"")
-
- Start-ChocolateyProcessAsAdmin -exeToRun $airPath -statements $airParams
+ Install-ChocolateyPackage @params
Write-ChocolateySuccess $package
} catch {
diff --git a/HipChat/tools/chocolateyUninstall.ps1 b/HipChat/tools/chocolateyUninstall.ps1
index ab21bed..416e66a 100644
--- a/HipChat/tools/chocolateyUninstall.ps1
+++ b/HipChat/tools/chocolateyUninstall.ps1
@@ -2,17 +2,9 @@ $package = 'HipChat'
try {
- $hipChatGuid = Get-ChildItem HKLM:\SOFTWARE\Classes\Installer\Products |
- Get-ItemProperty -Name 'ProductName' |
- ? { $_.ProductName -eq 'HipChat' } |
- Select -ExpandProperty PSChildName -First 1
-
- $properties = Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\$hipChatGuid\InstallProperties
-
- $pkg = $properties.LocalPackage
-
- # http://help.adobe.com/en_US/air/redist/WS485a42d56cd19641-70d979a8124ef20a34b-8000.html#WS485a42d56cd19641-70d979a8124ef20a34b-7ffa
- msiexec.exe /x $pkg /qb-! REBOOT=ReallySuppress
+ # http://stackoverflow.com/questions/450027/uninstalling-an-msi-file-from-the-command-line-without-using-msiexec
+ $msiArgs = "/X{56B4BFF9-4967-4A84-A5B0-4B49AB070100} /qb-! REBOOT=ReallySuppress"
+ Start-ChocolateyProcessAsAdmin "$msiArgs" 'msiexec'
Write-ChocolateySuccess $package
} catch {