Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mnaoumov/invoke-nativeapplication
A set of helper functions to invoke native applications in PowerShell with proper error messages and exit codes handlers
https://github.com/mnaoumov/invoke-nativeapplication
Last synced: about 1 month ago
JSON representation
A set of helper functions to invoke native applications in PowerShell with proper error messages and exit codes handlers
- Host: GitHub
- URL: https://github.com/mnaoumov/invoke-nativeapplication
- Owner: mnaoumov
- License: mit
- Created: 2015-04-04T21:59:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-11-10T07:31:16.000Z (about 3 years ago)
- Last Synced: 2023-03-24T11:58:58.309Z (almost 2 years ago)
- Language: PowerShell
- Size: 10.7 KB
- Stars: 19
- Watchers: 6
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Invoke-NativeApplication
A set of helper functions to invoke native applications in PowerShell with proper error messages and exit codes handlersInvocation of native applications in PowerShell seems to easy but actually it is not.
For more explanation see https://mnaoumov.wordpress.com/2015/01/11/execution-of-external-commands-in-powershell-done-right/ and https://mnaoumov.wordpress.com/2015/03/31/execution-of-external-commands-native-applications-in-powershell-done-right-part-2/
After you import the *exec.ps1* you can safely use
exec { .\some-application-that-writes-to-the-STDERR-at-returns-some-exit-code.exe }
safeexec { .\some-application-that-writes-to-the-STDERR-at-returns-some-exit-code.exe }
and those functions will capture STDERR stream properly and check exit code after your application has exited.