Executing UninstallString using C#
问题 I have a problem to execute uninstallString using process, it won't work in all cases. I need a generic procedure that will run in any case. one of my ideas was to parse uninstall string Code: int indexOfExe = uninstallString.ToLower().IndexOf(".exe") + 4; string exeFile = uninstallString.Substring(0, indexOfExe).Trim(); string args = uninstallString.Substring(indexOfExe, uninstallString.Length - indexOfExe).Trim(); if (args.Length > 0) { procStartInfo.FileName = exeFile; procStartInfo