From d9509757e3f2d45f262a844643b65237b01624eb Mon Sep 17 00:00:00 2001 From: Eric Fontana Date: Mon, 13 Apr 2015 11:06:41 -0400 Subject: [PATCH] Fixed installer/uninstaller for chocolatey --- chocolateyInstall.ps1.template | 2 +- chocolateyUninstall.ps1.guid | 7 +++---- chocolateyUninstall.ps1.template | 2 +- chocolateyUninstall.ps1.template.orig | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/chocolateyInstall.ps1.template b/chocolateyInstall.ps1.template index f2c908b..5035692 100644 --- a/chocolateyInstall.ps1.template +++ b/chocolateyInstall.ps1.template @@ -2,7 +2,7 @@ $fileType = 'msi' $silentArgs = '/quiet' $scriptPath = $(Split-Path $MyInvocation.MyCommand.Path) -$fileFullPath = Join-Path $scriptPath 'TimberWinR-${version}' +$fileFullPath = Join-Path $scriptPath 'TimberWinR-${version}.msi' try { Install-ChocolateyInstallPackage $packageName $fileType $silentArgs $fileFullPath } catch { diff --git a/chocolateyUninstall.ps1.guid b/chocolateyUninstall.ps1.guid index a83f6c0..9f488ba 100644 --- a/chocolateyUninstall.ps1.guid +++ b/chocolateyUninstall.ps1.guid @@ -1,8 +1,7 @@ $packageName = 'TimberWinR-${version}' # arbitrary name for the package, used in messages $installerType = 'msi' #only one of these: exe, msi, msu -$url = 'http://www.ericfontana.com/TimberWinR/TimberWinR-${version}.0.msi' # download url +$scriptPath = $(Split-Path $MyInvocation.MyCommand.Path) +$fileFullPath = Join-Path $scriptPath 'TimberWinR-${version}.msi' $silentArgs = '${PROJECTGUID} /quiet' $validExitCodes = @(0) #please insert other valid exit codes here, exit codes for ms http://msdn.microsoft.com/en-us/library/aa368542(VS.85).aspx -UnInstall-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" -validExitCodes $validExitCodes - - +UnInstall-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "fileFullPath" -validExitCodes $validExitCodes diff --git a/chocolateyUninstall.ps1.template b/chocolateyUninstall.ps1.template index e9f850d..b82bc12 100644 --- a/chocolateyUninstall.ps1.template +++ b/chocolateyUninstall.ps1.template @@ -1,7 +1,7 @@ $packageName = 'TimberWinR-${version}' # arbitrary name for the package, used in messages $installerType = 'msi' #only one of these: exe, msi, msu $scriptPath = $(Split-Path $MyInvocation.MyCommand.Path) -$fileFullPath = Join-Path $scriptPath 'TimberWinR-${version}' +$fileFullPath = Join-Path $scriptPath 'TimberWinR-${version}.msi' $silentArgs = '${PROJECTGUID} /quiet' $validExitCodes = @(0) #please insert other valid exit codes here, exit codes for ms http://msdn.microsoft.com/en-us/library/aa368542(VS.85).aspx UnInstall-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "fileFullPath" -validExitCodes $validExitCodes diff --git a/chocolateyUninstall.ps1.template.orig b/chocolateyUninstall.ps1.template.orig index e2d665a..c582a6a 100644 --- a/chocolateyUninstall.ps1.template.orig +++ b/chocolateyUninstall.ps1.template.orig @@ -1,7 +1,7 @@ $packageName = 'TimberWinR-${version}' # arbitrary name for the package, used in messages $installerType = 'msi' #only one of these: exe, msi, msu $scriptPath = $(Split-Path $MyInvocation.MyCommand.Path) -$fileFullPath = Join-Path $scriptPath 'TimberWinR-${version}' +$fileFullPath = Join-Path $scriptPath 'TimberWinR-${version}.msi' $silentArgs = '${PROJECTGUID} /quiet' $validExitCodes = @(0) #please insert other valid exit codes here, exit codes for ms http://msdn.microsoft.com/en-us/library/aa368542(VS.85).aspx UnInstall-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "fileFullPath" -validExitCodes $validExitCodes \ No newline at end of file