diff --git a/packages/psnotify.vm/psnotify.vm.nuspec b/packages/psnotify.vm/psnotify.vm.nuspec index ec71a8d65..5ea1687ba 100644 --- a/packages/psnotify.vm/psnotify.vm.nuspec +++ b/packages/psnotify.vm/psnotify.vm.nuspec @@ -2,7 +2,7 @@ psnotify.vm - 0.2.4 + 0.2.4.20231020 alphillips-lab A POC tool to fight .NET anti-dumping tricks. diff --git a/packages/psnotify.vm/tools/chocolateyinstall.ps1 b/packages/psnotify.vm/tools/chocolateyinstall.ps1 index bee0952a5..5fa89682e 100644 --- a/packages/psnotify.vm/tools/chocolateyinstall.ps1 +++ b/packages/psnotify.vm/tools/chocolateyinstall.ps1 @@ -10,38 +10,29 @@ try { $unzipLocation = 'C:\' # psnotify has a requirement of being located in 'C:\psnotify' $toolDir = Join-Path $unzipLocation $toolName - try { - $toolDir = Join-Path $unzipLocation $toolName - $shortcutDir = Join-Path ${Env:TOOL_LIST_DIR} $category + $shortcutDir = Join-Path ${Env:TOOL_LIST_DIR} $category - # Remove files from previous zips for upgrade - VM-Remove-PreviousZipPackage ${Env:chocolateyPackageFolder} + # Remove files from previous zips for upgrade + VM-Remove-PreviousZipPackage ${Env:chocolateyPackageFolder} - # Download and unzip - $packageArgs = @{ - packageName = ${Env:ChocolateyPackageName} - unzipLocation = $unzipLocation - url = $zipUrl - checksum = $zipSha256 - checksumType = 'sha256' - url64bit = $zipUrl_64 - checksum64 = $zipSha256_64 - } - Install-ChocolateyZipPackage @packageArgs - VM-Assert-Path $toolDir - $executablePath = Join-Path $toolDir "$toolName.exe" -Resolve - $shortcut = Join-Path $shortcutDir "$toolName.lnk" - - $executableDir = $toolDir - Install-ChocolateyShortcut -shortcutFilePath $shortcut -targetPath $executablePath -WorkingDirectory $executableDir - VM-Assert-Path $shortcut - - Install-BinFile -Name $toolName -Path $executablePath - return $executablePath - } catch { - VM-Write-Log-Exception $_ + # Download and unzip + $packageArgs = @{ + packageName = ${Env:ChocolateyPackageName} + unzipLocation = $unzipLocation + url = $zipUrl + checksum = $zipSha256 + checksumType = 'sha256' + url64bit = $zipUrl_64 + checksum64 = $zipSha256_64 } + Install-ChocolateyZipPackage @packageArgs VM-Assert-Path $toolDir + $executablePath = Join-Path $toolDir "$toolName.exe" -Resolve + $shortcut = Join-Path $shortcutDir "$toolName.lnk" + + $executableDir = $toolDir + Install-ChocolateyShortcut -shortcutFilePath $shortcut -targetPath $executablePath -WorkingDirectory $executableDir + VM-Assert-Path $shortcut } catch { VM-Write-Log-Exception $_ } \ No newline at end of file diff --git a/packages/psnotify.vm/tools/chocolateyuninstall.ps1 b/packages/psnotify.vm/tools/chocolateyuninstall.ps1 index 4f2abdd1d..90b9f5fa5 100644 --- a/packages/psnotify.vm/tools/chocolateyuninstall.ps1 +++ b/packages/psnotify.vm/tools/chocolateyuninstall.ps1 @@ -9,7 +9,4 @@ $toolDir = 'C:\psnotify' Remove-Item $toolDir -Recurse -Force -ea 0 | Out-Null # Remove tool shortcut -VM-Remove-Tool-Shortcut $toolName $category - -# Uninstall binary -Uninstall-BinFile -Name $toolName +VM-Remove-Tool-Shortcut $toolName $category \ No newline at end of file