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
Post a Comment