wahlster
asked on
Invoke .exe as Foreground Process
Hi, I am very new to Powershell. I am trying to execute a backkup application in a try/catch block as a foreground process. When I run the following commands in Powershell it appears to spawn the process as a background process and continues to next line of the script without waiting for the exe to complete. I need the script to wait for the exe to complete. Here is a snippit of the script:
- Backup C: drive to H:\Backup
$exe = 'C:\Program Files (x86)\Snapshot\snapshot.ex e'
& $exe C: H:\Backup
Thanks in advance for your help,
Terry
- Backup C: drive to H:\Backup
$exe = 'C:\Program Files (x86)\Snapshot\snapshot.ex
& $exe C: H:\Backup
Thanks in advance for your help,
Terry
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.