Chocolatey Misc Helpers Extension 0.0.3.1


choco://chocolatey-misc-helpers.extension To use choco:// protocol URLs, install (unofficial) choco:// Protocol support


##chocolatey-misc-helpers.extension provides helper functions to be used in Chocolatey install/uninstall scripts by package creators/maintainers.

These didn't fit into the concept scope of my other extensions so I started this miscellaneous collection and will add to it as "needed."

###HELPERS:

  • Start-CheckandStop - Checks for and stops a process if running. Creates variables to easily restart the process after a package upgrade. Useful for installers that fail if the program is running, i.e. KeePass, uTorrent, etc. or for stopping programs that automatically run after install, i.e. Skype, SuMo, Ellp, etc. as well as for programs that will stop running during an upgrade and then not return to a running state post upgrade, i.e. Plex Media Server, etc. Screenshot
  • Start-CheckandThrow - Checks if a process is running and aborts installation/upgrade if so. Screenshot
  • Start-WaitandStop - Starts a background process to stop a (foreground) process - quits after 5 minutes or after the process gets stopped. Useful to stop additional pop-up programs during installation. Screenshot
  • Start-WaitandStopActual - (do not directly use) Called by Start-WaitandStop to make Start-WaitandStop simple to use.
  • Test-Dependency - Provides a way to verify a dependency is installed. Does NOT check version. Returns True/False. Screenshot
  • Read comments in the scripts for help implementing.

###USAGE:

  • Start-CheckandStop "ProcessName"
  • Start-CheckandThrow "ProcessName"
  • Start-WaitandStop "ProcessName"
  • Test-Dependency "DependencyPackageName"

Click here to Patreon-ize the package maintainer.


Downloads number: 40 241
Size: 13.92 kB
Update Date: 28.01.2019
Distribution Scheme: free of charge software
Operation Systems: Windows 7 x64, Windows 8 x64,
Windows 8.1 x64, Windows 10 x64, Windows 11 x64