c# - Recieve names and versions of installed MSI packages -


this question has answer here:

i need names , versions of installed msi packages on local machine c# project. ideas?

thank you.

i'd take @ microsoft.deployment.windowsinstaller namespace found in windows installer xml (wix) deployment tools foundation (dtf). has:

public static ienumerable<productinstallation> getproducts(     string productcode,     string usersid,     usercontexts context ) 

productcode (string)

productcode (guid) of product instances enumerated. instances of products within scope of context specified usersid , context parameters enumerated. parameter may set null enumerate products in specified context.

usersid (string)

specifies security identifier (sid) restricts context of enumeration. sid value other s-1-1-0 considered user sid , restricts enumeration current user or user in system. special sid string s-1-1-0 (everyone) specifies enumeration across users in system. parameter can set null restrict enumeration scope current user. when context set machine context only, usersid must null.

context (usercontexts)

specifies user context.

that wraps win32 msi api msienumproductsex function. brings collection of productinstallation can linq queries against find out need know installed msi's.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -