Is there a way to run Stop-Process after a specific program closes itself automatically?
I am trying to close my VPN client after my torrent client closes itself.
Any help is appreciated.
Is there a way to run Stop-Process after a specific program closes itself automatically?
I am trying to close my VPN client after my torrent client closes itself.
Any help is appreciated.
Copyright © 2021 Jogjafile Inc.
You are looking for
Wait-Process: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/wait-process?view=powershell-7This script waits until the Torrent client has exited and then closes VPNClient. You have to replace TorrentClientProcessName and VPNClientProcessName with their process names.