diff --git a/MSICA/L10N/sl_SI.po b/MSICA/L10N/sl_SI.po index b06d382..f3ce657 100644 --- a/MSICA/L10N/sl_SI.po +++ b/MSICA/L10N/sl_SI.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: MSICA\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-03-22 13:34+0100\n" +"POT-Creation-Date: 2014-03-24 13:54+0100\n" "PO-Revision-Date: \n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" @@ -70,80 +70,116 @@ msgstr "MSICA" msgid "SUBLANG_DEFAULT" msgstr "SUBLANG_DEFAULT" -#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:4 -#: MSIBuild/En.Win32.Release.ActionText-2.idtx:4 -#: MSIBuild/En.x64.Debug.ActionText-2.idtx:4 -#: MSIBuild/En.x64.Release.ActionText-2.idtx:4 +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:7 +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:8 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:7 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:8 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:7 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:8 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:7 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:8 msgid "Certificate: [1]" msgstr "Digitalno potrdilo: [1]" -#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:5 -#: MSIBuild/En.Win32.Release.ActionText-2.idtx:5 -#: MSIBuild/En.x64.Debug.ActionText-2.idtx:5 -#: MSIBuild/En.x64.Release.ActionText-2.idtx:5 +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:10 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:10 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:10 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:10 msgid "Configuring services" msgstr "Nastavljanje servisov" -#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:7 -#: MSIBuild/En.Win32.Release.ActionText-2.idtx:7 -#: MSIBuild/En.x64.Debug.ActionText-2.idtx:7 -#: MSIBuild/En.x64.Release.ActionText-2.idtx:7 -msgid "Evaluating WLAN profiles" -msgstr "Pregled profilov WLAN" - -#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:4 -#: MSIBuild/En.Win32.Release.ActionText-2.idtx:4 -#: MSIBuild/En.x64.Debug.ActionText-2.idtx:4 -#: MSIBuild/En.x64.Release.ActionText-2.idtx:4 -msgid "Installing certificates" -msgstr "Nameščanje digitalnih potrdil" - -#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:6 -#: MSIBuild/En.Win32.Release.ActionText-2.idtx:6 -#: MSIBuild/En.x64.Debug.ActionText-2.idtx:6 -#: MSIBuild/En.x64.Release.ActionText-2.idtx:6 -msgid "Registering scheduled tasks" -msgstr "Registracija razporejenih opravil" - #: MSIBuild/En.Win32.Debug.ActionText-2.idtx:8 #: MSIBuild/En.Win32.Release.ActionText-2.idtx:8 #: MSIBuild/En.x64.Debug.ActionText-2.idtx:8 #: MSIBuild/En.x64.Release.ActionText-2.idtx:8 -msgid "Removing WLAN profiles" -msgstr "Odstranjevanje profilov WLAN" +msgid "Installing certificates" +msgstr "Nameščanje digitalnih potrdil" + +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:12 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:12 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:12 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:12 +msgid "Installing scheduled tasks" +msgstr "Nameščanje razporejenih opravil" + +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:9 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:9 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:9 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:9 +msgid "Installing WLAN profiles" +msgstr "Nameščanje profilov WLAN" + +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:7 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:7 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:7 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:7 +msgid "Removing certificates" +msgstr "Odstranjevanje digitalnih potrdil" + +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:4 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:4 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:4 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:4 +msgid "Removing scheduled tasks" +msgstr "Odstranjevanje razporejenih opravil" #: MSIBuild/En.Win32.Debug.ActionText-2.idtx:6 #: MSIBuild/En.Win32.Release.ActionText-2.idtx:6 #: MSIBuild/En.x64.Debug.ActionText-2.idtx:6 #: MSIBuild/En.x64.Release.ActionText-2.idtx:6 +msgid "Removing WLAN profiles" +msgstr "Odstranjevanje profilov WLAN" + +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:12 +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:4 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:12 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:4 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:12 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:4 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:12 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:4 msgid "Scheduled task: [1]" msgstr "Razporejeno opravilo: [1]" +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:10 +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:11 #: MSIBuild/En.Win32.Debug.ActionText-2.idtx:5 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:10 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:11 #: MSIBuild/En.Win32.Release.ActionText-2.idtx:5 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:10 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:11 #: MSIBuild/En.x64.Debug.ActionText-2.idtx:5 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:10 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:11 #: MSIBuild/En.x64.Release.ActionText-2.idtx:5 msgid "Service: [1]" msgstr "Servis: [1]" -#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:9 -#: MSIBuild/En.Win32.Release.ActionText-2.idtx:9 -#: MSIBuild/En.x64.Debug.ActionText-2.idtx:9 -#: MSIBuild/En.x64.Release.ActionText-2.idtx:9 -msgid "Setting WLAN profiles" -msgstr "Nastavljanje profilov WLAN" +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:11 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:11 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:11 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:11 +msgid "Starting services" +msgstr "Zagon servisov" -#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:7 -#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:8 +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:5 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:5 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:5 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:5 +msgid "Stopping services" +msgstr "Zaustavitev servisov" + +#: MSIBuild/En.Win32.Debug.ActionText-2.idtx:6 #: MSIBuild/En.Win32.Debug.ActionText-2.idtx:9 -#: MSIBuild/En.Win32.Release.ActionText-2.idtx:7 -#: MSIBuild/En.Win32.Release.ActionText-2.idtx:8 +#: MSIBuild/En.Win32.Release.ActionText-2.idtx:6 #: MSIBuild/En.Win32.Release.ActionText-2.idtx:9 -#: MSIBuild/En.x64.Debug.ActionText-2.idtx:7 -#: MSIBuild/En.x64.Debug.ActionText-2.idtx:8 +#: MSIBuild/En.x64.Debug.ActionText-2.idtx:6 #: MSIBuild/En.x64.Debug.ActionText-2.idtx:9 -#: MSIBuild/En.x64.Release.ActionText-2.idtx:7 -#: MSIBuild/En.x64.Release.ActionText-2.idtx:8 +#: MSIBuild/En.x64.Release.ActionText-2.idtx:6 #: MSIBuild/En.x64.Release.ActionText-2.idtx:9 msgid "WLAN profile: [1]" msgstr "Profil WLAN: [1]" + +#~ msgid "Evaluating WLAN profiles" +#~ msgstr "Pregled profilov WLAN" diff --git a/MSICA/MSIBuild/Makefile b/MSICA/MSIBuild/Makefile index 1c39cde..0ce215d 100644 --- a/MSICA/MSIBuild/Makefile +++ b/MSICA/MSIBuild/Makefile @@ -78,12 +78,15 @@ All :: "$(LANG).$(PLAT).$(CFG).ActionText-2.idt" Action Description Template s$(MSIBUILD_LENGTH_ID) L0 L0 1252 ActionText Action -CertificatesExec Installing certificates Certificate: [1] -ServiceConfigExec Configuring services Service: [1] -ScheduledTasksExec Registering scheduled tasks Scheduled task: [1] -EvaluateWLANProfiles Evaluating WLAN profiles WLAN profile: [1] +RemoveScheduledTasksExec Removing scheduled tasks Scheduled task: [1] +StopServicesExec Stopping services Service: [1] RemoveWLANProfilesExec Removing WLAN profiles WLAN profile: [1] -SetWLANProfilesExec Setting WLAN profiles WLAN profile: [1] +RemoveCertificatesExec Removing certificates Certificate: [1] +InstallCertificatesExec Installing certificates Certificate: [1] +InstallWLANProfilesExec Installing WLAN profiles WLAN profile: [1] +SetServiceStartExec Configuring services Service: [1] +StartServicesExec Starting services Service: [1] +InstallScheduledTasksExec Installing scheduled tasks Scheduled task: [1] <= INSTALLSTATE_LOCAL) { // Component is or should be installed. Install the certificate. - olExecute.AddTail(new MSICA::COpCertInstall(binCert.GetData(), binCert.GetCount(), sStore, iEncoding, iFlags, MSICA_CERT_TICK_SIZE)); + olInstallCertificates.AddTail(new MSICA::COpCertInstall(binCert.GetData(), binCert.GetCount(), sStore, iEncoding, iFlags, MSICA_CERT_TICK_SIZE)); } else if (iAction >= INSTALLSTATE_REMOVED) { // Component is installed, but should be degraded to advertised/removed. Delete the certificate. - olExecute.AddTail(new MSICA::COpCertRemove(binCert.GetData(), binCert.GetCount(), sStore, iEncoding, iFlags, MSICA_CERT_TICK_SIZE)); + olRemoveCertificates.AddTail(new MSICA::COpCertRemove(binCert.GetData(), binCert.GetCount(), sStore, iEncoding, iFlags, MSICA_CERT_TICK_SIZE)); } // The amount of tick space to add for each certificate to progress indicator. @@ -152,15 +166,6 @@ UINT MSICA_API CertificatesEval(MSIHANDLE hInstall) if (::MsiProcessMessage(hInstall, INSTALLMESSAGE_PROGRESS, hRecordProg) == IDCANCEL) { uiResult = ERROR_INSTALL_USEREXIT; break; } } ::MsiViewClose(hViewCert); - - if (uiResult == NO_ERROR) { - // Save the sequences. - uiResult = MSICA::SaveSequence(hInstall, _T("CertificatesExec"), _T("CertificatesCommit"), _T("CertificatesRollback"), olExecute); - } else if (uiResult != ERROR_INSTALL_USEREXIT) { - ::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_OPLIST_CREATE); - ::MsiRecordSetInteger(hRecordProg, 2, uiResult ); - ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); - } } else { ::MsiRecordSetInteger(hRecordProg, 1, uiResult); ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); @@ -170,43 +175,9 @@ UINT MSICA_API CertificatesEval(MSIHANDLE hInstall) ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); } } - } else { - uiResult = ERROR_INSTALL_DATABASE_OPEN; - ::MsiRecordSetInteger(hRecordProg, 1, uiResult); - ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); - } - olExecute.Free(); - if (bIsCoInitialized) ::CoUninitialize(); - return uiResult; -} - - -UINT MSICA_API ServiceConfigEval(MSIHANDLE hInstall) -{ - //::MessageBox(NULL, _T(__FUNCTION__), _T("MSICA"), MB_OK); - - UINT uiResult; - BOOL bIsCoInitialized = SUCCEEDED(::CoInitialize(NULL)); - MSICA::COpList olExecute; - BOOL bRollbackEnabled; - PMSIHANDLE - hDatabase, - hRecordProg = ::MsiCreateRecord(3); - ATL::CAtlString sValue; - - // Check and add the rollback enabled state. - uiResult = ::MsiGetProperty(hInstall, _T("RollbackDisabled"), sValue); - bRollbackEnabled = uiResult == NO_ERROR ? - _ttoi(sValue) || !sValue.IsEmpty() && _totlower(sValue.GetAt(0)) == _T('y') ? FALSE : TRUE : - TRUE; - olExecute.AddTail(new MSICA::COpRollbackEnable(bRollbackEnabled)); - - // Open MSI database. - hDatabase = ::MsiGetActiveDatabase(hInstall); - if (hDatabase) { // Check if ServiceConfigure table exists. If it doesn't exist, there's nothing to do. - MSICONDITION condition = ::MsiDatabaseIsTablePersistent(hDatabase, _T("ServiceConfigure")); + condition = ::MsiDatabaseIsTablePersistent(hDatabase, _T("ServiceConfigure")); if (condition == MSICONDITION_FALSE || condition == MSICONDITION_TRUE) { PMSIHANDLE hViewSC; @@ -252,7 +223,7 @@ UINT MSICA_API ServiceConfigEval(MSIHANDLE hInstall) } if (iValue >= 0) { // Set service start type. - olExecute.AddTail(new MSICA::COpSvcSetStart(sValue, iValue, MSICA_SVC_SET_START_TICK_SIZE)); + olSetServiceStarts.AddTail(new MSICA::COpSvcSetStart(sValue, iValue, MSICA_SVC_SET_START_TICK_SIZE)); // The amount of tick space to add to progress indicator. ::MsiRecordSetInteger(hRecordProg, 1, 3 ); @@ -268,7 +239,7 @@ UINT MSICA_API ServiceConfigEval(MSIHANDLE hInstall) } if ((iValue & 4) != 0) { // Stop service. - olExecute.AddTail(new MSICA::COpSvcStop(sValue, (iValue & 1) ? TRUE : FALSE, MSICA_SVC_STOP_TICK_SIZE)); + olStopServices.AddTail(new MSICA::COpSvcStop(sValue, (iValue & 1) ? TRUE : FALSE, MSICA_SVC_STOP_TICK_SIZE)); // The amount of tick space to add to progress indicator. ::MsiRecordSetInteger(hRecordProg, 1, 3 ); @@ -276,7 +247,7 @@ UINT MSICA_API ServiceConfigEval(MSIHANDLE hInstall) if (::MsiProcessMessage(hInstall, INSTALLMESSAGE_PROGRESS, hRecordProg) == IDCANCEL) { uiResult = ERROR_INSTALL_USEREXIT; break; } } else if ((iValue & 2) != 0) { // Start service. - olExecute.AddTail(new MSICA::COpSvcStart(sValue, (iValue & 1) ? TRUE : FALSE, MSICA_SVC_START_TICK_SIZE)); + olStartServices.AddTail(new MSICA::COpSvcStart(sValue, (iValue & 1) ? TRUE : FALSE, MSICA_SVC_START_TICK_SIZE)); // The amount of tick space to add to progress indicator. ::MsiRecordSetInteger(hRecordProg, 1, 3 ); @@ -285,15 +256,6 @@ UINT MSICA_API ServiceConfigEval(MSIHANDLE hInstall) } } ::MsiViewClose(hViewSC); - - if (uiResult == NO_ERROR) { - // Save the sequences. - uiResult = MSICA::SaveSequence(hInstall, _T("ServiceConfigExec"), _T("ServiceConfigCommit"), _T("ServiceConfigRollback"), olExecute); - } else if (uiResult != ERROR_INSTALL_USEREXIT) { - ::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_OPLIST_CREATE); - ::MsiRecordSetInteger(hRecordProg, 2, uiResult ); - ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); - } } else { ::MsiRecordSetInteger(hRecordProg, 1, uiResult); ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); @@ -303,43 +265,9 @@ UINT MSICA_API ServiceConfigEval(MSIHANDLE hInstall) ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); } } - } else { - uiResult = ERROR_INSTALL_DATABASE_OPEN; - ::MsiRecordSetInteger(hRecordProg, 1, uiResult); - ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); - } - olExecute.Free(); - if (bIsCoInitialized) ::CoUninitialize(); - return uiResult; -} - - -UINT MSICA_API ScheduledTasksEval(MSIHANDLE hInstall) -{ - //::MessageBox(NULL, _T(__FUNCTION__), _T("MSICA"), MB_OK); - - UINT uiResult; - BOOL bIsCoInitialized = SUCCEEDED(::CoInitialize(NULL)); - MSICA::COpList olExecute; - BOOL bRollbackEnabled; - PMSIHANDLE - hDatabase, - hRecordProg = ::MsiCreateRecord(3); - ATL::CAtlString sValue; - - // Check and add the rollback enabled state. - uiResult = ::MsiGetProperty(hInstall, _T("RollbackDisabled"), sValue); - bRollbackEnabled = uiResult == NO_ERROR ? - _ttoi(sValue) || !sValue.IsEmpty() && _totlower(sValue.GetAt(0)) == _T('y') ? FALSE : TRUE : - TRUE; - olExecute.AddTail(new MSICA::COpRollbackEnable(bRollbackEnabled)); - - // Open MSI database. - hDatabase = ::MsiGetActiveDatabase(hInstall); - if (hDatabase) { // Check if ScheduledTask table exists. If it doesn't exist, there's nothing to do. - MSICONDITION condition = ::MsiDatabaseIsTablePersistent(hDatabase, _T("ScheduledTask")); + condition = ::MsiDatabaseIsTablePersistent(hDatabase, _T("ScheduledTask")); if (condition == MSICONDITION_FALSE || condition == MSICONDITION_TRUE) { PMSIHANDLE hViewST; @@ -409,10 +337,10 @@ UINT MSICA_API ScheduledTasksEval(MSIHANDLE hInstall) } else break; - olExecute.AddTail(opCreateTask); + olInstallScheduledTask.AddTail(opCreateTask); } else if (iAction >= INSTALLSTATE_REMOVED) { // Component is installed, but should be degraded to advertised/removed. Delete the task. - olExecute.AddTail(new MSICA::COpTaskDelete(sDisplayName, MSICA_TASK_TICK_SIZE)); + olRemoveScheduledTask.AddTail(new MSICA::COpTaskDelete(sDisplayName, MSICA_TASK_TICK_SIZE)); } // The amount of tick space to add for each task to progress indicator. @@ -421,15 +349,6 @@ UINT MSICA_API ScheduledTasksEval(MSIHANDLE hInstall) if (::MsiProcessMessage(hInstall, INSTALLMESSAGE_PROGRESS, hRecordProg) == IDCANCEL) { uiResult = ERROR_INSTALL_USEREXIT; break; } } ::MsiViewClose(hViewST); - - if (uiResult == NO_ERROR) { - // Save the sequences. - uiResult = MSICA::SaveSequence(hInstall, _T("ScheduledTasksExec"), _T("ScheduledTasksCommit"), _T("ScheduledTasksRollback"), olExecute); - } else if (uiResult != ERROR_INSTALL_USEREXIT) { - ::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_OPLIST_CREATE); - ::MsiRecordSetInteger(hRecordProg, 2, uiResult ); - ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); - } } else { ::MsiRecordSetInteger(hRecordProg, 1, uiResult); ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); @@ -439,44 +358,9 @@ UINT MSICA_API ScheduledTasksEval(MSIHANDLE hInstall) ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); } } - } else { - uiResult = ERROR_INSTALL_DATABASE_OPEN; - ::MsiRecordSetInteger(hRecordProg, 1, uiResult); - ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); - } - olExecute.Free(); - if (bIsCoInitialized) ::CoUninitialize(); - return uiResult; -} - - -UINT MSICA_API EvaluateWLANProfiles(MSIHANDLE hInstall) -{ - //::MessageBox(NULL, _T(__FUNCTION__), _T("MSICA"), MB_OK); - - UINT uiResult; - BOOL bIsCoInitialized = SUCCEEDED(::CoInitialize(NULL)); - MSICA::COpList olExecuteInstall, olExecuteRemove; - BOOL bRollbackEnabled; - PMSIHANDLE - hDatabase, - hRecordProg = ::MsiCreateRecord(3); - ATL::CAtlString sValue; - - // Check and add the rollback enabled state. - uiResult = ::MsiGetProperty(hInstall, _T("RollbackDisabled"), sValue); - bRollbackEnabled = uiResult == NO_ERROR ? - _ttoi(sValue) || !sValue.IsEmpty() && _totlower(sValue.GetAt(0)) == _T('y') ? FALSE : TRUE : - TRUE; - olExecuteInstall.AddTail(new MSICA::COpRollbackEnable(bRollbackEnabled)); - olExecuteRemove.AddTail(new MSICA::COpRollbackEnable(bRollbackEnabled)); - - // Open MSI database. - hDatabase = ::MsiGetActiveDatabase(hInstall); - if (hDatabase) { // Check if WLANProfile table exists. If it doesn't exist, there's nothing to do. - MSICONDITION condition = ::MsiDatabaseIsTablePersistent(hDatabase, _T("WLANProfile")); + condition = ::MsiDatabaseIsTablePersistent(hDatabase, _T("WLANProfile")); if (condition == MSICONDITION_FALSE || condition == MSICONDITION_TRUE) { PMSIHANDLE hViewProfile; @@ -573,7 +457,7 @@ UINT MSICA_API EvaluateWLANProfiles(MSIHANDLE hInstall) for (i = 0; i < pInterfaceList->dwNumberOfItems; i++) { // Check for not ready state in interface. if (pInterfaceList->InterfaceInfo[i].isState != wlan_interface_state_not_ready) { - olExecuteInstall.AddTail(new MSICA::COpWLANProfileSet(pInterfaceList->InterfaceInfo[i].InterfaceGuid, 0, sName, sProfileXML, MSICA_WLAN_PROFILE_TICK_SIZE)); + olInstallWLANProfiles.AddTail(new MSICA::COpWLANProfileSet(pInterfaceList->InterfaceInfo[i].InterfaceGuid, 0, sName, sProfileXML, MSICA_WLAN_PROFILE_TICK_SIZE)); iTick += MSICA_WLAN_PROFILE_TICK_SIZE; } } @@ -587,7 +471,7 @@ UINT MSICA_API EvaluateWLANProfiles(MSIHANDLE hInstall) for (i = 0; i < pInterfaceList->dwNumberOfItems; i++) { // Check for not ready state in interface. if (pInterfaceList->InterfaceInfo[i].isState != wlan_interface_state_not_ready) { - olExecuteRemove.AddTail(new MSICA::COpWLANProfileDelete(pInterfaceList->InterfaceInfo[i].InterfaceGuid, sName, MSICA_WLAN_PROFILE_TICK_SIZE)); + olRemoveWLANProfiles.AddTail(new MSICA::COpWLANProfileDelete(pInterfaceList->InterfaceInfo[i].InterfaceGuid, sName, MSICA_WLAN_PROFILE_TICK_SIZE)); iTick += MSICA_WLAN_PROFILE_TICK_SIZE; } } @@ -608,16 +492,6 @@ UINT MSICA_API EvaluateWLANProfiles(MSIHANDLE hInstall) ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); } ::MsiViewClose(hViewProfile); - - if (uiResult == NO_ERROR) { - // Save the sequences. - uiResult = MSICA::SaveSequence(hInstall, _T("SetWLANProfilesExec"), _T("SetWLANProfilesCommit"), _T("SetWLANProfilesRollback"), olExecuteInstall); - uiResult = MSICA::SaveSequence(hInstall, _T("RemoveWLANProfilesExec"), _T("RemoveWLANProfilesCommit"), _T("RemoveWLANProfilesRollback"), olExecuteRemove); - } else if (uiResult != ERROR_INSTALL_USEREXIT) { - ::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_OPLIST_CREATE); - ::MsiRecordSetInteger(hRecordProg, 2, uiResult ); - ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); - } } else { ::MsiRecordSetInteger(hRecordProg, 1, uiResult); ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); @@ -627,14 +501,38 @@ UINT MSICA_API EvaluateWLANProfiles(MSIHANDLE hInstall) ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); } } + + // Save the sequences. + if (uiResult == NO_ERROR) uiResult = MSICA::SaveSequence(hInstall, _T("RemoveScheduledTasksExec"), _T("RemoveScheduledTasksCommit"), _T("RemoveScheduledTasksRollback"), olRemoveScheduledTask); + if (uiResult == NO_ERROR) uiResult = MSICA::SaveSequence(hInstall, _T("StopServicesExec"), _T("StopServicesCommit"), _T("StopServicesRollback"), olStopServices); + if (uiResult == NO_ERROR) uiResult = MSICA::SaveSequence(hInstall, _T("RemoveWLANProfilesExec"), _T("RemoveWLANProfilesCommit"), _T("RemoveWLANProfilesRollback"), olRemoveWLANProfiles); + if (uiResult == NO_ERROR) uiResult = MSICA::SaveSequence(hInstall, _T("RemoveCertificatesExec"), _T("RemoveCertificatesCommit"), _T("RemoveCertificatesRollback"), olRemoveCertificates); + if (uiResult == NO_ERROR) uiResult = MSICA::SaveSequence(hInstall, _T("InstallCertificatesExec"), _T("InstallCertificatesCommit"), _T("InstallCertificatesRollback"), olInstallCertificates); + if (uiResult == NO_ERROR) uiResult = MSICA::SaveSequence(hInstall, _T("InstallWLANProfilesExec"), _T("InstallWLANProfilesCommit"), _T("InstallWLANProfilesRollback"), olInstallWLANProfiles); + if (uiResult == NO_ERROR) uiResult = MSICA::SaveSequence(hInstall, _T("SetServiceStartExec"), _T("SetServiceStartCommit"), _T("SetServiceStartRollback"), olSetServiceStarts); + if (uiResult == NO_ERROR) uiResult = MSICA::SaveSequence(hInstall, _T("StartServicesExec"), _T("StartServicesCommit"), _T("StartServicesRollback"), olStartServices); + if (uiResult == NO_ERROR) uiResult = MSICA::SaveSequence(hInstall, _T("InstallScheduledTasksExec"), _T("InstallScheduledTasksCommit"), _T("InstallScheduledTasksRollback"), olInstallScheduledTask); + + if (uiResult != NO_ERROR && uiResult != ERROR_INSTALL_USEREXIT) { + ::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_OPLIST_CREATE); + ::MsiRecordSetInteger(hRecordProg, 2, uiResult ); + ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); + } } else { uiResult = ERROR_INSTALL_DATABASE_OPEN; ::MsiRecordSetInteger(hRecordProg, 1, uiResult); ::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg); } - olExecuteInstall.Free(); - olExecuteRemove.Free(); + olInstallScheduledTask.Free(); + olStartServices.Free(); + olSetServiceStarts.Free(); + olInstallWLANProfiles.Free(); + olInstallCertificates.Free(); + olRemoveCertificates.Free(); + olRemoveWLANProfiles.Free(); + olStopServices.Free(); + olRemoveScheduledTask.Free(); if (bIsCoInitialized) ::CoUninitialize(); return uiResult; @@ -643,7 +541,7 @@ UINT MSICA_API EvaluateWLANProfiles(MSIHANDLE hInstall) UINT MSICA_API ExecuteSequence(MSIHANDLE hInstall) { - ::MessageBox(NULL, _T(__FUNCTION__), _T("MSICA"), MB_OK); + //::MessageBox(NULL, _T(__FUNCTION__), _T("MSICA"), MB_OK); return MSICA::ExecuteSequence(hInstall); } diff --git a/MSICA/MSICA.h b/MSICA/MSICA.h index c0a72a3..81725a3 100644 --- a/MSICA/MSICA.h +++ b/MSICA/MSICA.h @@ -24,12 +24,7 @@ extern "C" { #endif - UINT MSICA_API CertificatesEval(MSIHANDLE hInstall); - UINT MSICA_API ServiceConfigEval(MSIHANDLE hInstall); - UINT MSICA_API ScheduledTasksEval(MSIHANDLE hInstall); - UINT MSICA_API EvaluateWLANProfiles(MSIHANDLE hInstall); - UINT MSICA_API RemoveWLANProfiles(MSIHANDLE hInstall); - UINT MSICA_API SetWLANProfiles(MSIHANDLE hInstall); + UINT MSICA_API MSICAInitialize(MSIHANDLE hInstall); UINT MSICA_API ExecuteSequence(MSIHANDLE hInstall); #ifdef __cplusplus