private static bool IsWindowsApplication(string fileName)
        {
            NativeCommandProcessor.SHFILEINFO psfi = new NativeCommandProcessor.SHFILEINFO();
            switch ((int)NativeCommandProcessor.SHGetFileInfo(fileName, 0U, ref psfi, (uint)Marshal.SizeOf((object)psfi), 8192U))
            {
            case 0:
                return(false);

            case 17744:
                return(false);

            case 23117:
                return(false);

            default:
                return(true);
            }
        }
 private static extern IntPtr SHGetFileInfo(
     string pszPath,
     uint dwFileAttributes,
     ref NativeCommandProcessor.SHFILEINFO psfi,
     uint cbSizeFileInfo,
     uint uFlags);