How can I f开发者_StackOverflow社区ind an exe file is setup file or not ?
for example :
bool isSetupFile = IsSetup(@"C:\KasperSkySetup.exe");
regards
It'd require a very complex and error-prone heuristic to tell whether an executable is an installation package or not.
In general, the answer is no, you cannot do that.
Additional reading:
http://blogs.msdn.com/b/oldnewthing/archive/2010/07/26/10042389.aspx
A setup file could be created by anyone and is a program like any other. But you could probably find some common header bytes for the files if they are created by a popular installer program like Wise.
Information on installer programs (not .msi based) can be found at: http://www.installsite.org/pages/en/tt_nonmsi.htm
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论