Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Situation...
- There is a DOS batch script named foo.bat in C:\temp\foo.bat. We want
- ******************************************************************************/
- $things-todo-when-batchfile-completes = {
- new-item 'c:\temp\thinger-done.txt'
- Get-EventSubscriber | Unregister-Event
- }
- $file_run = Start-Process -FilePath ".\thing.bat" -PassThru
- $job = register-objectevent -InputObject $file_run `
- -eventname exited `
- -SourceIdentifier test `
- -Action $event_response
Add Comment
Please, Sign In to add comment