我正在使用Inno Setup为我的应用程序A创建一个简单的设置。从第二个应用程序B,我想调用应用程序A的unins000.exe。
所以我只用了这段代码,它工作得很好:
//get a new process to start
ProcessStartInfo startInfo = new ProcessStartInfo();
//get the basic exe file to run (the uninstall)
startInfo.FileName = installPathA() + "\\unins000.exe";
//start the uninstall
Process p = new Process();
p.StartInfo = startInfo;
p.Start();但在本例中,我在unins000.exe中将其硬编码为000。
我想知道的是,它可能会像unins...exe一样,自动检查...上应该有哪些数字。
一开始我想使用RegEx,但它只能在定义的字符串上使用,对吗?或者我也可以以我想要的方式使用它?还是有人知道更好的方法来做这件事?
发布于 2012-01-31 18:15:55
http://msdn.microsoft.com/en-us/library/8he88b63.aspx
DirectoryInfo.GetFiles()接受一个允许您搜索匹配的模式。
https://stackoverflow.com/questions/9077650
复制相似问题