繁体   English   中英

如果不匹配,则匹配unins000.exe

[英]match the unins000.exe if not 000

我正在使用Inno安装程序为我的应用程序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 ,但这只能在定义的字符串上使用对吗? 还是我也可以这种方式使用它? 还是有人知道更好的方法来做到这一点?

http://msdn.microsoft.com/zh-CN/library/8he88b63.aspx

DirectoryInfo.GetFiles()采用一种模式,允许您搜索匹配项。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM