1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 #ifndef INCLUDED_MSIHELPER_HXX
3 #define INCLUDED_MSIHELPER_HXX
6 #pragma warning(push, 1) /* disable warnings within system headers */
8 #define WIN32_LEAN_AND_MEAN
18 Get the value of the named property
21 [in] a valid msi handle.
24 [in] the name of the property.
27 [out] receives thes value of the property.
30 <TRUE/>if the property was found.
32 bool GetMsiProp(MSIHANDLE handle
, LPCTSTR name
, /*out*/std::wstring
& value
);
35 Set the value of a binary property which can only
36 have the values "0" or "1" to "1".
39 [in] a valid msi handle.
42 [in] the name of the property.
44 void SetMsiProp(MSIHANDLE handle
, LPCTSTR name
);
47 Set the value of a binary property which can only
48 have the values "0" or "1" to "0".
51 [in] a valid msi handle.
54 [in] the name of the property.
56 void UnsetMsiProp(MSIHANDLE handle
, LPCTSTR name
);
59 Returns whether a certain property is set meaning
60 its value is "1". This method should be used for
61 binary properties whose value can be "0" or "1".
64 <TRUE/>if the value of the specified property is
65 "1" else if the property is not defined or its
66 value is other than "1" <FALSE/> will be returned.
68 bool IsSetMsiProp(MSIHANDLE handle
, LPCTSTR name
);
71 Returns whether a certain property is set meaning
72 its value is not empty. This method should be used for
73 properties, that can have different values.
76 <TRUE/>if the value of the specified property is
77 not empty. If it is empty <FALSE/> will be returned.
79 bool IsMsiPropNotEmpty(MSIHANDLE handle
, LPCTSTR name
);
82 Query if this is an installation for all user or not.
85 [in] a valid msi handle.
88 <TRUE/>if this is an all user installation
90 bool IsAllUserInstallation(MSIHANDLE handle
);
93 Returns the destination folder of the office installation
94 as system path. The returned path contains a final '\'.
97 [in] a valid msi handle.
100 the destination path of the office installation finalized
103 std::wstring
GetOfficeInstallationPath(MSIHANDLE handle
);
106 Returns the absolute path of the office executable that
107 will be installed as system path.
110 [in] a valid msi handle.
113 the absolute system path of the office executable (e.g.
114 (C:\Program Files\StarOffice 8\program\soffice.exe").
116 std::wstring
GetOfficeExecutablePath(MSIHANDLE handle
);
119 Get the name of the office that will be installed
120 (e.g. StarOffice 8, StarSuite 8, ...).
123 [in] a valid msi handle.
126 the name of the office product that will be installed.
128 std::wstring
GetProductName(MSIHANDLE handle
);
131 Determine if the specified module is installed locally.
134 [in] a valid msi handle.
137 [in] the name of the module.
140 <TRUE/>if the specified module is installed locally.
142 bool IsModuleInstalled(MSIHANDLE handle
, LPCTSTR name
);
145 Determine if the specified module is selected to be installed
149 [in] a valid msi handle.
152 [in] the name of the module.
155 <TRUE/>if the specified module is about to be installed locally.
157 bool IsModuleSelectedForInstallation(MSIHANDLE handle
, LPCTSTR name
);
160 Determine if the specified module which is locally installed is
161 selected for deinstallation.
164 [in] a valid msi handle.
167 [in] the name of the module.
170 <TRUE/>if the specified module is about to be deinstalled.
172 bool IsModuleSelectedForDeinstallation(MSIHANDLE handle
, LPCTSTR name
);
175 Determine whether this is a complete uninstallation or not.
178 [in] a valid msi handle.
181 <TRUE/>if this is a complete deinstallation.
183 bool IsCompleteDeinstallation(MSIHANDLE handle
);
187 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */