C# 클래스 WixSharp.CommonTasks.AppSearch

The utility class implementing the common 'MSI AppSearch' tasks (Directory, File, Registry and Product searches).
파일 보기 프로젝트 열기: Eun/WixSharp 1 사용 예제들

공개 메소드들

메소드 설명
DirExists ( string dir ) : bool

Determines whether the dir exists.

FileExists ( string file ) : bool

Determines whether the file exists.

GetProductCode ( string name ) : string[]

Gets the 'product code' of the installed product.

GetProductName ( string productCode ) : string

Gets the 'product name' of the installed product.

GetProducts ( ) : string[]

Gets array of 'product codes' (GUIDs) of all installed products.

GetRegValue ( RegistryKey root, string keyPath, string valueName ) : object

Gets the registry value.

IniFileToDictionary ( string iniFile, Encoding encoding = null ) : Dictionary>

Converts INI file content into dictionary.

IniFileValue ( string file, string section, string field, Encoding encoding = null ) : string

Returns INI file the field value.

It returns null if file or the field not found.

IsProductInstalled ( string productCode ) : bool

Determines whether the product is installed.

RegKeyExists ( RegistryKey root, string keyPath ) : bool

Determines whether the registry key exists.

비공개 메소드들

메소드 설명
IniToDictionary ( string iniFileContent ) : Dictionary>
MsiEnumProducts ( int iProductIndex, StringBuilder lpProductBuf ) : int
MsiGetProductInfo ( string product, string property, [ valueBuf, Int32 &len ) : Int32

메소드 상세

DirExists() 공개 정적인 메소드

Determines whether the dir exists.
public static DirExists ( string dir ) : bool
dir string The directory path.
리턴 bool

FileExists() 공개 정적인 메소드

Determines whether the file exists.
public static FileExists ( string file ) : bool
file string The file path.
리턴 bool

GetProductCode() 공개 정적인 메소드

Gets the 'product code' of the installed product.
public static GetProductCode ( string name ) : string[]
name string The product name.
리턴 string[]

GetProductName() 공개 정적인 메소드

Gets the 'product name' of the installed product.
public static GetProductName ( string productCode ) : string
productCode string The product code.
리턴 string

GetProducts() 공개 정적인 메소드

Gets array of 'product codes' (GUIDs) of all installed products.
public static GetProducts ( ) : string[]
리턴 string[]

GetRegValue() 공개 정적인 메소드

Gets the registry value.
public static GetRegValue ( RegistryKey root, string keyPath, string valueName ) : object
root Microsoft.Win32.RegistryKey The root.
keyPath string The key path.
valueName string Name of the value.
리턴 object

IniFileToDictionary() 공개 정적인 메소드

Converts INI file content into dictionary.
public static IniFileToDictionary ( string iniFile, Encoding encoding = null ) : Dictionary>
iniFile string The INI file.
encoding System.Text.Encoding The encoding.
리턴 Dictionary>

IniFileValue() 공개 정적인 메소드

Returns INI file the field value.

It returns null if file or the field not found.

public static IniFileValue ( string file, string section, string field, Encoding encoding = null ) : string
file string The INI file path.
section string The section.
field string The field.
encoding System.Text.Encoding The encoding.
리턴 string

IsProductInstalled() 공개 정적인 메소드

Determines whether the product is installed.
public static IsProductInstalled ( string productCode ) : bool
productCode string The product code.
리턴 bool

RegKeyExists() 공개 정적인 메소드

Determines whether the registry key exists.
public static RegKeyExists ( RegistryKey root, string keyPath ) : bool
root Microsoft.Win32.RegistryKey The root.
keyPath string The key path.
리턴 bool