chocolateyuninstall.ps1 545 B

123456789101112131415161718
  1. $ErrorActionPreference = 'Stop'; # stop on all errors
  2. $packageArgs = @{
  3. packageName = $env:ChocolateyPackageName
  4. softwareName = 'PolyMC*'
  5. }
  6. Write-Host "Removing Start Menu and Desktop shortcuts"
  7. $StartMenuShortcut = Join-Path $env:programdata "Microsoft\Windows\Start Menu\Programs\PolyMC.lnk"
  8. $DesktopShortcut = Join-Path $([Environment]::GetFolderPath("Desktop")) "PolyMC.lnk"
  9. if (Test-Path $StartMenuShortcut)
  10. {
  11. Remove-Item $StartMenuShortcut
  12. }
  13. if (Test-Path $DesktopShortcut)
  14. {
  15. Remove-Item $DesktopShortcut
  16. }