Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Start-Process ignores the parameter "-wait" with explorer.exe

$
0
0

Hi all,

maybe it´s a stupid question, but...

Start-Process notepad.exe -Wait


...will wait for closing the process "notepad.exe".

Start-Process explorer.exe -Wait

...will not wait for closing it, instead the script will go on.

My question: Why? :) is it because "explorer.exe" is a core element of Windows and there are more then one process? For whaty exactly is the parameter "-wait" waiting for? Finishing the process name, the Process ID?

is it a bug?

Otherwise, do you have a good idea for that scenario:

a script will be started and opens a dedicated network share. Within this share the user (ServiceDesk Employee) can paste a CSV file, and after closing the Explorer, the script will read in this CSV and import that informations.

Thank you guys!


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>