// ModifyMsi.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "ModifyMsi.h" #include #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif #define TYPE_STRING 's' #define TYPE_INTEGER 'i' #define TYPE_BINARY 'v' ///////////////////////////////////////////////////////////////////////////// using namespace std; void DisplayDatabaseError(); BOOL OpenTableAndViewWithCondition(MSIHANDLE hDatabase,char *szSelect,MSIHANDLE *phView,BOOL showError); BOOL SetBannerTextWidthAndHeight(MSIHANDLE hDatabase, char *table, char *dialog, char *width,char *height,char *control); BOOL UpdateText(MSIHANDLE hDatabase, char *table, char *dialog, char *text, char *control); #define TEMP_BUF_SIZE 256 /*============================================================================================================================================================*/ // $(ProjectDir)ModifyMsi.exe $(ProjectDir) int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) { // char *CurrentDir = argv[1]; // char *szRelativePathName=argv[2]; // "Install\\"; char *MSIFileName = argv[1]; // "RSODBC-win64-1.1.0.msi" char szPathName[TEMP_BUF_SIZE]; MSIHANDLE hDatabase; UINT rc; // snprintf(szPathName, TEMP_BUF_SIZE, "%s%s\\%s",CurrentDir,szRelativePathName,MSIFileName); snprintf(szPathName, TEMP_BUF_SIZE,"%s",MSIFileName); rc = MsiOpenDatabase(szPathName,MSIDBOPEN_TRANSACT,&hDatabase); if (rc != ERROR_SUCCESS) { cout<<"Error in opening the MSI database:rc = "<