I'm using Inno Setup to create a simple setup for my application, A. From a second application, B, I want to call to the unins000.exe
of application A.
So I just use this code, and that works perfectly:
//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();
But in this case, I've hard coded it to 000
in the unins000.exe
.
What I was wondering about is would be possible to make it something like unins...exe
where it will automatically check for what numbers should be on the ...
.
I thought at first to use RegEx
, but this can only be used on a defined string right ? Or could I also use it in this way I want? Or does someone know a better trick to do this ?
http://msdn.microsoft.com/en-us/library/8he88b63.aspx
The DirectoryInfo.GetFiles() takes a pattern that allows you to search for matches.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.