views:

61

answers:

1

I am building a kiosk type config script on low-spec hardware.

At the end of the script, it runs the various apps for the user to interact with. I currently use a plain Invoke-Command "path\to\app.exe". I want to get the interface up and running as quickly as possible. I want to launch the apps asynchronous.

I know there there is start-job, and the -asJob flag in Invoke-Commnad, but they don't seem to work with launching visual apps. Is there a way to do this?

A: 

Windows subsystem (visual) EXEs start asynchronously by default. And you don't need Invoke-Command to invoke an exe. If you exeute notepad.exe like so:

PS> Notepad
PS>

Note that the PowerShell prompt returns immediately while notepad is still running. The same applies in a script.

Keith Hill
ahhhh, thanks. I guess this hardware was so low-spec it seemed they weren't async.
falkaholic