src/Framework/Msi/MsiInstall.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 namespace AppSecInc {
00004 namespace Msi {
00005 
00007 class MsiInstall
00008 {
00009 private:
00010     MSIHANDLE _h;
00011     MsiInstall& msiInstall; // CHECK_* macros need something called msiInstall to log errors
00012 public:
00013     MSIHANDLE Peek() const { return _h; }
00015         std::wstring GetProperty(const std::wstring& name);
00017     void SetProperty(const std::wstring& name, const std::wstring& value);
00019     std::string GetProperty(const std::string& name);
00021     void SetProperty(const std::string& name, const std::string& value);
00023     void GetBinaryData(const std::wstring& name, std::vector<char>& data);
00025         std::wstring GetViewData(const std::wstring& query);
00027     void GetViewInfo(const std::wstring& query, std::vector<std::wstring>& names, std::vector<std::wstring>& types);
00029     void SetActionData(const std::wstring& action, const std::wstring& data);
00031         std::wstring GetActionData();
00033     void LogError(int error);
00035     void LogError(const std::wstring& message);
00037     void LogInfo(const std::wstring& action, const std::wstring& message);
00039         std::wstring GetFormattedString(const std::wstring& s);
00041     bool EvaluateCondition(const std::wstring& condition);
00043         bool IsInstalling();
00045         bool IsUnInstalling();  
00047         bool IsRollback();
00049         bool IsComponentInstalling(const std::wstring& component);
00051         bool IsComponentUnInstalling(const std::wstring& component);
00053         bool IsComponentReInstalling(const std::wstring& component);
00055         void GetComponentState(const std::wstring& component, INSTALLSTATE& component_installed, INSTALLSTATE& component_action);
00057     void DoAction(const std::wstring& action);
00058     MsiInstall(MSIHANDLE h);
00059     virtual ~MsiInstall();
00060 };
00061 
00062 }}
00063 


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com