1 #ifndef INCLUDED_MSIHELPER_HXX
2 #define INCLUDED_MSIHELPER_HXX
5 #pragma warning(push, 1) /* disable warnings within system headers */
7 #define WIN32_LEAN_AND_MEAN
17 Get the value of the named property
20 [in] a valid msi handle.
23 [in] the name of the property.
26 [out] receives thes value of the property.
29 <TRUE/>if the property was found.
31 bool GetMsiProp(MSIHANDLE handle
, LPCTSTR name
, /*out*/std::wstring
& value
);
34 Set the value of a binary property which can only
35 have the values "0" or "1" to "1".
38 [in] a valid msi handle.
41 [in] the name of the property.
43 void SetMsiProp(MSIHANDLE handle
, LPCTSTR name
);
46 Set the value of a binary property which can only
47 have the values "0" or "1" to "0".
50 [in] a valid msi handle.
53 [in] the name of the property.
55 void UnsetMsiProp(MSIHANDLE handle
, LPCTSTR name
);
58 Returns whether a certain property is set meaning
59 its value is "1". This method should be used for
60 binary properties whose value can be "0" or "1".
63 <TRUE/>if the value of the specified property is
64 "1" else if the property is not defined or its
65 value is other than "1" <FALSE/> will be returned.
67 bool IsSetMsiProp(MSIHANDLE handle
, LPCTSTR name
);
70 Returns whether a certain property is set meaning
71 its value is not empty. This method should be used for
72 properties, that can have different values.
75 <TRUE/>if the value of the specified property is
76 not empty. If it is empty <FALSE/> will be returned.
78 bool IsMsiPropNotEmpty(MSIHANDLE handle
, LPCTSTR name
);
81 Query if this is an installation for all user or not.
84 [in] a valid msi handle.
87 <TRUE/>if this is an all user installation
89 bool IsAllUserInstallation(MSIHANDLE handle
);
92 Returns the destination folder of the office installation
93 as system path. The returned path contains a final '\'.
96 [in] a valid msi handle.
99 the destination path of the office installation finalized
102 std::wstring
GetOfficeInstallationPath(MSIHANDLE handle
);
105 Returns the absolute path of the office executable that
106 will be installed as system path.
109 [in] a valid msi handle.
112 the absolute system path of the office executable (e.g.
113 (C:\Program Files\StarOffice 8\program\soffice.exe").
115 std::wstring
GetOfficeExecutablePath(MSIHANDLE handle
);
118 Get the name of the office that will be installed
119 (e.g. StarOffice 8, StarSuite 8, ...).
122 [in] a valid msi handle.
125 the name of the office product that will be installed.
127 std::wstring
GetProductName(MSIHANDLE handle
);
130 Determine if the specified module is installed locally.
133 [in] a valid msi handle.
136 [in] the name of the module.
139 <TRUE/>if the specified module is installed locally.
141 bool IsModuleInstalled(MSIHANDLE handle
, LPCTSTR name
);
144 Determine if the specified module is selected to be installed
148 [in] a valid msi handle.
151 [in] the name of the module.
154 <TRUE/>if the specified module is about to be installed locally.
156 bool IsModuleSelectedForInstallation(MSIHANDLE handle
, LPCTSTR name
);
159 Determine if the specified module which is locally installed is
160 selected for deinstallation.
163 [in] a valid msi handle.
166 [in] the name of the module.
169 <TRUE/>if the specified module is about to be deinstalled.
171 bool IsModuleSelectedForDeinstallation(MSIHANDLE handle
, LPCTSTR name
);
174 Determine whether this is a complete uninstallation or not.
177 [in] a valid msi handle.
180 <TRUE/>if this is a complete deinstallation.
182 bool IsCompleteDeinstallation(MSIHANDLE handle
);