I'm working on a script that uses UUPDUMP to create Windows ISOs in an unattended manner. The issue I'm facing is that the `uup_download_windows.cmd` script prompts me with an interactive message that says "press 0 or Q to exit," which means that my `Start-Process` command never completes. This causes the rest of my PowerShell script to hang, even though the ISO has been successfully downloaded and is ready.
I've thought about executing the command without waiting for it to finish and then checking for the existence of the ISO in a loop, along with validating its hash. However, I'm looking for alternative solutions that would allow me to continue past the `Start-Process -Wait` command when the external process requires some form of interaction. Any creative ideas?
3 Answers
Have you considered setting up a basic Microsoft Deployment Toolkit (MDT) task sequence? It allows for unattended operations and you can customize it to handle zero-touch deployments. It might work better for your diverse needs.
You can use input redirection to provide the necessary input to the script without waiting. Try creating a file named `input.txt` that contains a 'Q' followed by a carriage return. Then run the script like this: `uup_download_windows.cmd < input.txt`. This will simulate pressing 'Q' automatically.
One simple solution is to modify the CMD script itself so that it just exits with a success code instead of prompting for user input. This way, your script won't get stuck waiting for a response.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures