Once I needed to launch a specific program from a USB stick during a SCCM Task Sequence. In this case it was a cmd script which needed to be launched outside the Task Sequence.

Underneath my Powershell script to do so. It searches for a specific directory (<UNIQUE DIRECTORY>) which only exists on the USB stick. By doing so we can filter the drive letter and store it in a variable. After that we execute the specific file (<SPECIFY FILE>).

A very simple but effective script which u can also use on other drives than a USB Stick.

 

 

Share This