I get a list of bootable applications and I want to get only the Application Path launched at startup. The boot application list also contains a parameter passed to the application, which are in different templates; examples
C: \ Program Files (x86) \ Internet Download Manager \ IDMan.exe / onboot
"C: \ Program Files \ Process Hacker 2 \ ProcessHacker.exe" -hide
"C: \ Program Files \ CCleaner \ CCleaner64.exe" / MONITOR
"C: \ Program Files (x86) \ Google \ Chrome \ Application \ chrome.exe" --no-startup-window / prefetch: 5
"C: \ Program Files (x86) \ GlassWire \ glasswire.exe" -hide
C: \ Program Files \ IDT \ WDM \ sttray64.exe
I am trying to use the following regex
Regex.Matches(input, "([a-zA-Z]*:[\\[a-zA-Z0-9 .]*]*)");
Please indicate to me how I can extract only the path to the program, ignoring all parameters and other launch commands.