How to read MSI properties in c#

后端 未结 5 1534
一生所求
一生所求 2020-12-31 11:13

I want to read properties of MSI in C# in desktop application.I am using following code:

    public static string GetMSIProperty( string msiFile, string msiP         


        
5条回答
  •  梦谈多话
    2020-12-31 11:19

    I was trying to re-use this code, and the only change I had to make to get the code posted by Devashri to work is this line:

    string sql = String.Format("SELECT `Value` FROM `Property` WHERE `Property`='{0}'", msiProperty);
    

    Watch out for the single quotes!

提交回复
热议问题