C# Exclude Parameters From File Paths -


i'm reading startup items registry , checking if associated files exist.

example registry values:

"c:\program files (x86)\ati technologies\ati.ace\core-static\amd64\clistart.exe" msrun  c:\program files (x86)\ati technologies\ati.ace\core-static\amd64\clistart.exe msrun  "c:\program files (x86)\ati technologies\ati.ace\core-static\amd64\clistart.exe" /parameter  "c:\program files (x86)\ati technologies\ati.ace\core-static\amd64\clistart.exe" -paramaeter1 -parameter2  c:\program files (x86)\ati technologies\ati.ace\core-static\amd64\clistart.exe -msrun /parameter  "c:\program files (x86)\ati technologies\ati.ace\core-static\amd64\clistart.exe -msrun /parameter" 

how can exclude parameters? want c:\program files (x86)\ati technologies\ati.ace\core-static\amd64\clistart.exe part.

how operating system makes separation?

is chance homework exercise? anyway, achieve wanted result.

return yourpath.trim('\"').substring(0, yourpath.lastindexof(".exe") + 3); 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -