Dodal sem polno podporo za Task Scheduler 2.0.
Dodal sem obvestila o napakah pri delu z razporejenimi opravili. Estetski popravki
This commit is contained in:
parent
99c6bc3ac4
commit
d5162a64d7
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6,7 +6,6 @@ MSICALib/MSITSCA.vcxproj -text svneol=unset#text/xml
|
|||||||
MSICALib/MSITSCA.vcxproj.filters -text svneol=unset#text/xml
|
MSICALib/MSITSCA.vcxproj.filters -text svneol=unset#text/xml
|
||||||
MSICALib/MSITSCAOp.cpp -text
|
MSICALib/MSITSCAOp.cpp -text
|
||||||
MSICALib/MSITSCAOp.h -text
|
MSICALib/MSITSCAOp.h -text
|
||||||
MSICALib/Naredi.txt -text
|
|
||||||
MSICALib/StdAfx.cpp -text
|
MSICALib/StdAfx.cpp -text
|
||||||
MSICALib/StdAfx.h -text
|
MSICALib/StdAfx.h -text
|
||||||
MSICALib/res/MSITSCA.rc -text svneol=unset#unset
|
MSICALib/res/MSITSCA.rc -text svneol=unset#unset
|
||||||
|
@ -30,6 +30,7 @@ ScheduledTask Flags N DoubleInteger Task's flags to pass in IScheduledWorkI
|
|||||||
ScheduledTask Priority N DoubleInteger 32;64;128;256;16384,32768 Task's priority to pass in ITask::SetPriority() call.
|
ScheduledTask Priority N DoubleInteger 32;64;128;256;16384,32768 Task's priority to pass in ITask::SetPriority() call.
|
||||||
ScheduledTask User Y Formatted Account name to run task as. Use empty string for system account.
|
ScheduledTask User Y Formatted Account name to run task as. Use empty string for system account.
|
||||||
ScheduledTask Password Y Formatted Account password to run task as. Use NULL for system account.
|
ScheduledTask Password Y Formatted Account password to run task as. Use NULL for system account.
|
||||||
|
ScheduledTask Author Y Formatted Task author.
|
||||||
ScheduledTask Description Y Formatted Task description.
|
ScheduledTask Description Y Formatted Task description.
|
||||||
ScheduledTask IdleMin Y Integer A value that specifies how long, in minutes, the system must remain idle before the work item can run.
|
ScheduledTask IdleMin Y Integer A value that specifies how long, in minutes, the system must remain idle before the work item can run.
|
||||||
ScheduledTask IdleDeadline Y Integer A value that specifies the maximum number of minutes that the Task Scheduler will wait for the idle-time period.
|
ScheduledTask IdleDeadline Y Integer A value that specifies the maximum number of minutes that the Task Scheduler will wait for the idle-time period.
|
||||||
@ -131,12 +132,16 @@ Vse :: "$(JEZIK).$(CFG).$(PLAT).Error-2.idt"
|
|||||||
Error Message
|
Error Message
|
||||||
i2 L0
|
i2 L0
|
||||||
1250 Error Error
|
1250 Error Error
|
||||||
2550 Pri odpiranju namestitvenega paketa je prišlo do napake.
|
2550 Pri odpiranju namestitvenega paketa je prišlo do napake. Obrnite se na svojo tehnično službo.
|
||||||
2551 Pri pripravi seznama razvršèenih opravil je prišlo do napake [2].
|
2551 Pri pripravi seznama razvrščenih opravil je prišlo do napake [2]. Obrnite se na svojo tehnično službo.
|
||||||
2552 Pri pisanju v datoteko seznama razporejenih opravil »[2]« je prišlo do napake [3].
|
2552 Pri pisanju v datoteko seznama razporejenih opravil »[2]« je prišlo do napake [3]. Obrnite se na svojo tehnično službo.
|
||||||
2553 Pri nastavljanju parametra »[2]« je prišlo do napake [3].
|
2553 Pri nastavljanju parametra »[2]« je prišlo do napake [3]. Obrnite se na svojo tehnično službo.
|
||||||
2554 Pri brisanju datoteke »[2]« je prišlo do napake [3].
|
2554 Pri brisanju datoteke »[2]« je prišlo do napake [3]. Obrnite se na svojo tehnično službo.
|
||||||
2555 Pri premikanju datoteke »[2]« v »[3]« je prišlo do napake [4].
|
2555 Pri premikanju datoteke »[2]« v »[3]« je prišlo do napake [4]. Obrnite se na svojo tehnično službo.
|
||||||
|
2556 Pri ustvarjanju razporejenega opravila »[2]« je prišlo do napake [3]. Obrnite se na svojo tehnično službo.
|
||||||
|
2557 Pri brisanju razporejenega opravila »[2]« je prišlo do napake [3]. Obrnite se na svojo tehnično službo.
|
||||||
|
2558 Pri o(ne)mogočanju razporejenega opravila »[2]« je prišlo do napake [3]. Obrnite se na svojo tehnično službo.
|
||||||
|
2559 Pri kopiranju razporejenega opravila »[2]« v »[3]« je prišlo do napake [4]. Obrnite se na svojo tehnično službo.
|
||||||
<<NOKEEP
|
<<NOKEEP
|
||||||
|
|
||||||
"De.$(CFG).$(PLAT).Error-2.idt" : "Sl.$(CFG).$(PLAT).Error-2.idtx" "..\res\de_DE.po"
|
"De.$(CFG).$(PLAT).Error-2.idt" : "Sl.$(CFG).$(PLAT).Error-2.idtx" "..\res\de_DE.po"
|
||||||
@ -178,8 +183,8 @@ Vse :: "$(JEZIK).$(CFG).$(PLAT).ScheduledTask-1.idt"
|
|||||||
"$(JEZIK).$(CFG).$(PLAT).ScheduledTask-1.idt" : "Makefile" "..\..\include\MSINast.mak"
|
"$(JEZIK).$(CFG).$(PLAT).ScheduledTask-1.idt" : "Makefile" "..\..\include\MSINast.mak"
|
||||||
-if exist $@ del /f /q $@
|
-if exist $@ del /f /q $@
|
||||||
move /y << $@ > NUL
|
move /y << $@ > NUL
|
||||||
Task DisplayName Application Parameters WorkingDir Flags Priority User Password Description IdleMin IdleDeadline MaxRuntime Condition Component_
|
Task DisplayName Application Parameters WorkingDir Flags Priority User Password Author Description IdleMin IdleDeadline MaxRuntime Condition Component_
|
||||||
s$(MSI_TIP_ID) s255 s255 S255 s255 i4 i4 S255 S255 S255 I2 I2 i4 S255 s$(MSI_TIP_ID)
|
s$(MSI_TIP_ID) s255 s255 S255 s255 i4 i4 S255 S255 S255 S255 I2 I2 i4 S255 s$(MSI_TIP_ID)
|
||||||
ScheduledTask Task
|
ScheduledTask Task
|
||||||
<<NOKEEP
|
<<NOKEEP
|
||||||
|
|
||||||
|
@ -52,14 +52,16 @@ UINT MSITSCA_API EvaluateScheduledTasks(MSIHANDLE hInstall)
|
|||||||
CString sValue;
|
CString sValue;
|
||||||
|
|
||||||
assert(hRecordProg);
|
assert(hRecordProg);
|
||||||
|
#ifdef ASSERT_TO_DEBUG
|
||||||
assert(0); // Attach debugger here, or press "Ignore"!
|
assert(0); // Attach debugger here, or press "Ignore"!
|
||||||
|
#endif
|
||||||
|
|
||||||
// Check and add the rollback enabled state.
|
// Check and add the rollback enabled state.
|
||||||
uiResult = ::MsiGetProperty(hInstall, _T("RollbackDisabled"), sValue);
|
uiResult = ::MsiGetProperty(hInstall, _T("RollbackDisabled"), sValue);
|
||||||
bRollbackEnabled = uiResult == ERROR_SUCCESS ?
|
bRollbackEnabled = uiResult == ERROR_SUCCESS ?
|
||||||
_wtoi(sValue) || !sValue.IsEmpty() && towlower(sValue.GetAt(0)) == L'y' ? FALSE : TRUE :
|
_wtoi(sValue) || !sValue.IsEmpty() && towlower(sValue.GetAt(0)) == L'y' ? FALSE : TRUE :
|
||||||
TRUE;
|
TRUE;
|
||||||
olExecute.AddTail(new CMSITSCAOpEnableRollback(bRollbackEnabled));
|
olExecute.AddTail(new CMSITSCAOpRollbackEnable(bRollbackEnabled));
|
||||||
|
|
||||||
// Open MSI database.
|
// Open MSI database.
|
||||||
hDatabase = ::MsiGetActiveDatabase(hInstall);
|
hDatabase = ::MsiGetActiveDatabase(hInstall);
|
||||||
@ -70,7 +72,7 @@ UINT MSITSCA_API EvaluateScheduledTasks(MSIHANDLE hInstall)
|
|||||||
PMSIHANDLE hViewST;
|
PMSIHANDLE hViewST;
|
||||||
|
|
||||||
// Prepare a query to get a list/view of tasks.
|
// Prepare a query to get a list/view of tasks.
|
||||||
uiResult = ::MsiDatabaseOpenView(hDatabase, _T("SELECT Task,DisplayName,Application,Parameters,WorkingDir,Flags,Priority,User,Password,Description,IdleMin,IdleDeadline,MaxRuntime,Condition,Component_ FROM ScheduledTask"), &hViewST);
|
uiResult = ::MsiDatabaseOpenView(hDatabase, _T("SELECT Task,DisplayName,Application,Parameters,WorkingDir,Flags,Priority,User,Password,Author,Description,IdleMin,IdleDeadline,MaxRuntime,Condition,Component_ FROM ScheduledTask"), &hViewST);
|
||||||
if (uiResult == ERROR_SUCCESS) {
|
if (uiResult == ERROR_SUCCESS) {
|
||||||
// Execute query!
|
// Execute query!
|
||||||
uiResult = ::MsiViewExecute(hViewST, NULL);
|
uiResult = ::MsiViewExecute(hViewST, NULL);
|
||||||
@ -91,8 +93,8 @@ UINT MSITSCA_API EvaluateScheduledTasks(MSIHANDLE hInstall)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
// Read and evaluate task's condition.
|
// Read and evaluate task's condition.
|
||||||
uiResult = ::MsiRecordGetString(hRecord, 14, sValue);
|
uiResult = ::MsiRecordGetString(hRecord, 15, sValue);
|
||||||
if (uiResult != ERROR_SUCCESS) break; // TODO: If condition is empty string ommit evaluation.
|
if (uiResult != ERROR_SUCCESS) break;
|
||||||
condition = ::MsiEvaluateCondition(hInstall, sValue);
|
condition = ::MsiEvaluateCondition(hInstall, sValue);
|
||||||
if (condition == MSICONDITION_FALSE)
|
if (condition == MSICONDITION_FALSE)
|
||||||
continue;
|
continue;
|
||||||
@ -102,7 +104,7 @@ UINT MSITSCA_API EvaluateScheduledTasks(MSIHANDLE hInstall)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Read task's Component ID.
|
// Read task's Component ID.
|
||||||
uiResult = ::MsiRecordGetString(hRecord, 15, sValue);
|
uiResult = ::MsiRecordGetString(hRecord, 16, sValue);
|
||||||
if (uiResult != ERROR_SUCCESS) break;
|
if (uiResult != ERROR_SUCCESS) break;
|
||||||
|
|
||||||
// Get the component state.
|
// Get the component state.
|
||||||
@ -115,11 +117,12 @@ UINT MSITSCA_API EvaluateScheduledTasks(MSIHANDLE hInstall)
|
|||||||
if (iAction >= INSTALLSTATE_LOCAL) {
|
if (iAction >= INSTALLSTATE_LOCAL) {
|
||||||
// Component is or should be installed. Create the task.
|
// Component is or should be installed. Create the task.
|
||||||
PMSIHANDLE hViewTT;
|
PMSIHANDLE hViewTT;
|
||||||
CMSITSCAOpCreateTask *opCreateTask = new CMSITSCAOpCreateTask(sDisplayName, MSITSCA_TASK_TICK_SIZE);
|
CMSITSCAOpTaskCreate *opCreateTask = new CMSITSCAOpTaskCreate(sDisplayName, MSITSCA_TASK_TICK_SIZE);
|
||||||
assert(opCreateTask);
|
assert(opCreateTask);
|
||||||
|
|
||||||
// Populate the operation with task's data.
|
// Populate the operation with task's data.
|
||||||
opCreateTask->SetFromRecord(hInstall, hRecord);
|
uiResult = opCreateTask->SetFromRecord(hInstall, hRecord);
|
||||||
|
if (uiResult != ERROR_SUCCESS) break;
|
||||||
|
|
||||||
// Perform another query to get task's triggers.
|
// Perform another query to get task's triggers.
|
||||||
uiResult = ::MsiDatabaseOpenView(hDatabase, _T("SELECT Trigger,BeginDate,EndDate,StartTime,StartTimeRand,MinutesDuration,MinutesInterval,Flags,Type,DaysInterval,WeeksInterval,DaysOfTheWeek,DaysOfMonth,WeekOfMonth,MonthsOfYear FROM TaskTrigger WHERE Task_=?"), &hViewTT);
|
uiResult = ::MsiDatabaseOpenView(hDatabase, _T("SELECT Trigger,BeginDate,EndDate,StartTime,StartTimeRand,MinutesDuration,MinutesInterval,Flags,Type,DaysInterval,WeeksInterval,DaysOfTheWeek,DaysOfMonth,WeekOfMonth,MonthsOfYear FROM TaskTrigger WHERE Task_=?"), &hViewTT);
|
||||||
@ -138,7 +141,7 @@ UINT MSITSCA_API EvaluateScheduledTasks(MSIHANDLE hInstall)
|
|||||||
olExecute.AddTail(opCreateTask);
|
olExecute.AddTail(opCreateTask);
|
||||||
} else if (iAction >= INSTALLSTATE_REMOVED) {
|
} else if (iAction >= INSTALLSTATE_REMOVED) {
|
||||||
// Component is installed, but should be degraded to advertised/removed. Delete the task.
|
// Component is installed, but should be degraded to advertised/removed. Delete the task.
|
||||||
olExecute.AddTail(new CMSITSCAOpDeleteTask(sDisplayName, MSITSCA_TASK_TICK_SIZE));
|
olExecute.AddTail(new CMSITSCAOpTaskDelete(sDisplayName, MSITSCA_TASK_TICK_SIZE));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The amount of tick space to add for each task to progress indicator.
|
// The amount of tick space to add for each task to progress indicator.
|
||||||
@ -235,7 +238,9 @@ UINT MSITSCA_API InstallScheduledTasks(MSIHANDLE hInstall)
|
|||||||
BOOL bIsCoInitialized = SUCCEEDED(::CoInitialize(NULL));
|
BOOL bIsCoInitialized = SUCCEEDED(::CoInitialize(NULL));
|
||||||
CString sSequenceFilename;
|
CString sSequenceFilename;
|
||||||
|
|
||||||
|
#ifdef ASSERT_TO_DEBUG
|
||||||
assert(0); // Attach debugger here, or press "Ignore"!
|
assert(0); // Attach debugger here, or press "Ignore"!
|
||||||
|
#endif
|
||||||
|
|
||||||
uiResult = ::MsiGetProperty(hInstall, _T("CustomActionData"), sSequenceFilename);
|
uiResult = ::MsiGetProperty(hInstall, _T("CustomActionData"), sSequenceFilename);
|
||||||
if (uiResult == ERROR_SUCCESS) {
|
if (uiResult == ERROR_SUCCESS) {
|
||||||
@ -252,59 +257,52 @@ UINT MSITSCA_API InstallScheduledTasks(MSIHANDLE hInstall)
|
|||||||
// In case of commit/rollback, continue sequence on error, to do as much cleanup as possible.
|
// In case of commit/rollback, continue sequence on error, to do as much cleanup as possible.
|
||||||
session.m_bContinueOnError = bIsCleanup;
|
session.m_bContinueOnError = bIsCleanup;
|
||||||
|
|
||||||
// Get task scheduler object.
|
// Execute the operations.
|
||||||
hr = session.m_pTaskScheduler.CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL);
|
hr = lstOperations.Execute(&session);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Execute the operations.
|
if (!bIsCleanup && session.m_bRollbackEnabled) {
|
||||||
hr = lstOperations.Execute(&session);
|
// Save cleanup scripts.
|
||||||
if (SUCCEEDED(hr)) {
|
LPCTSTR pszExtension = ::PathFindExtension(sSequenceFilename);
|
||||||
if (!bIsCleanup && session.m_bRollbackEnabled) {
|
CString sSequenceFilenameCM, sSequenceFilenameRB;
|
||||||
// Save cleanup scripts.
|
|
||||||
LPCTSTR pszExtension = ::PathFindExtension(sSequenceFilename);
|
|
||||||
CString sSequenceFilenameCM, sSequenceFilenameRB;
|
|
||||||
|
|
||||||
sSequenceFilenameRB.Format(_T("%.*ls-rb%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
sSequenceFilenameRB.Format(_T("%.*ls-rb%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
||||||
sSequenceFilenameCM.Format(_T("%.*ls-cm%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
sSequenceFilenameCM.Format(_T("%.*ls-cm%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
||||||
|
|
||||||
// After end of commit, delete rollback file too. After end of rollback, delete commit file too.
|
// After end of commit, delete rollback file too. After end of rollback, delete commit file too.
|
||||||
session.m_olCommit.AddTail(new CMSITSCAOpDeleteFile(sSequenceFilenameRB));
|
session.m_olCommit.AddTail(new CMSITSCAOpFileDelete(sSequenceFilenameRB));
|
||||||
session.m_olRollback.AddTail(new CMSITSCAOpDeleteFile(sSequenceFilenameCM));
|
session.m_olRollback.AddTail(new CMSITSCAOpFileDelete(sSequenceFilenameCM));
|
||||||
|
|
||||||
// Save commit file first.
|
// Save commit file first.
|
||||||
hr = session.m_olCommit.SaveToFile(sSequenceFilenameCM);
|
hr = session.m_olCommit.SaveToFile(sSequenceFilenameCM);
|
||||||
|
if (SUCCEEDED(hr)) {
|
||||||
|
// Save rollback file next.
|
||||||
|
hr = session.m_olRollback.SaveToFile(sSequenceFilenameRB);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Save rollback file next.
|
uiResult = ERROR_SUCCESS;
|
||||||
hr = session.m_olRollback.SaveToFile(sSequenceFilenameRB);
|
|
||||||
if (SUCCEEDED(hr)) {
|
|
||||||
uiResult = ERROR_SUCCESS;
|
|
||||||
} else {
|
|
||||||
// Saving rollback file failed.
|
|
||||||
uiResult = HRESULT_CODE(hr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// Saving commit file failed.
|
// Saving rollback file failed.
|
||||||
uiResult = HRESULT_CODE(hr);
|
uiResult = HRESULT_CODE(hr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// No cleanup support required.
|
// Saving commit file failed.
|
||||||
uiResult = ERROR_SUCCESS;
|
uiResult = HRESULT_CODE(hr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Execution failed.
|
// No cleanup support required.
|
||||||
uiResult = HRESULT_CODE(hr);
|
uiResult = ERROR_SUCCESS;
|
||||||
}
|
|
||||||
|
|
||||||
if (uiResult != ERROR_SUCCESS) {
|
|
||||||
// Perform the cleanup now. The rollback script might not have been written to file yet.
|
|
||||||
// And even if it was, the rollback action might not get invoked at all (if scheduled in InstallExecuteSequence later than this action).
|
|
||||||
session.m_bContinueOnError = TRUE;
|
|
||||||
session.m_bRollbackEnabled = FALSE;
|
|
||||||
verify(SUCCEEDED(session.m_olRollback.Execute(&session)));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Task scheduler creation failed.
|
// Execution failed.
|
||||||
uiResult = HRESULT_CODE(hr);
|
uiResult = HRESULT_CODE(hr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (uiResult != ERROR_SUCCESS) {
|
||||||
|
// Perform the cleanup now. The rollback script might not have been written to file yet.
|
||||||
|
// And even if it was, the rollback action might not get invoked at all (if scheduled in InstallExecuteSequence later than this action).
|
||||||
|
session.m_bContinueOnError = TRUE;
|
||||||
|
session.m_bRollbackEnabled = FALSE;
|
||||||
|
verify(SUCCEEDED(session.m_olRollback.Execute(&session)));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Sequence loading failed. Don't panic => do nothing.
|
// Sequence loading failed. Don't panic => do nothing.
|
||||||
uiResult = ERROR_SUCCESS;
|
uiResult = ERROR_SUCCESS;
|
||||||
|
@ -45,6 +45,10 @@
|
|||||||
#define ERROR_INSTALL_SCHEDULED_TASKS_PROPERTY_SET 2553L
|
#define ERROR_INSTALL_SCHEDULED_TASKS_PROPERTY_SET 2553L
|
||||||
#define ERROR_INSTALL_DELETE_FAILED 2554L
|
#define ERROR_INSTALL_DELETE_FAILED 2554L
|
||||||
#define ERROR_INSTALL_MOVE_FAILED 2555L
|
#define ERROR_INSTALL_MOVE_FAILED 2555L
|
||||||
|
#define ERROR_INSTALL_TASK_CREATE_FAILED 2556L
|
||||||
|
#define ERROR_INSTALL_TASK_DELETE_FAILED 2557L
|
||||||
|
#define ERROR_INSTALL_TASK_ENABLE_FAILED 2558L
|
||||||
|
#define ERROR_INSTALL_TASK_COPY_FAILED 2559L
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -273,7 +273,6 @@
|
|||||||
<ResourceLocalizator Include="res\MSITSCA.rcx" />
|
<ResourceLocalizator Include="res\MSITSCA.rcx" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Naredi.txt" />
|
|
||||||
<None Include="res\en_GB.po" />
|
<None Include="res\en_GB.po" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
@ -50,6 +50,5 @@
|
|||||||
<None Include="res\en_GB.po">
|
<None Include="res\en_GB.po">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Naredi.txt" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
File diff suppressed because it is too large
Load Diff
@ -34,16 +34,16 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// CMSITSCAOpSingleStringOperation
|
// CMSITSCAOpTypeSingleString
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class CMSITSCAOpSingleStringOperation : public CMSITSCAOp
|
class CMSITSCAOpTypeSingleString : public CMSITSCAOp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMSITSCAOpSingleStringOperation(LPCWSTR pszValue = L"", int iTicks = 0);
|
CMSITSCAOpTypeSingleString(LPCWSTR pszValue = L"", int iTicks = 0);
|
||||||
|
|
||||||
friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpSingleStringOperation &op);
|
friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpTypeSingleString &op);
|
||||||
friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpSingleStringOperation &op);
|
friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpTypeSingleString &op);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CStringW m_sValue;
|
CStringW m_sValue;
|
||||||
@ -54,13 +54,13 @@ protected:
|
|||||||
// CMSITSCAOpDoubleStringOperation
|
// CMSITSCAOpDoubleStringOperation
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class CMSITSCAOpSrcDstStringOperation : public CMSITSCAOp
|
class CMSITSCAOpTypeSrcDstString : public CMSITSCAOp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMSITSCAOpSrcDstStringOperation(LPCWSTR pszValue1 = L"", LPCWSTR pszValue2 = L"", int iTicks = 0);
|
CMSITSCAOpTypeSrcDstString(LPCWSTR pszValue1 = L"", LPCWSTR pszValue2 = L"", int iTicks = 0);
|
||||||
|
|
||||||
friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpSrcDstStringOperation &op);
|
friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpTypeSrcDstString &op);
|
||||||
friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpSrcDstStringOperation &op);
|
friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpTypeSrcDstString &op);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CStringW m_sValue1;
|
CStringW m_sValue1;
|
||||||
@ -69,16 +69,16 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// CMSITSCAOpBooleanOperation
|
// CMSITSCAOpTypeBoolean
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class CMSITSCAOpBooleanOperation : public CMSITSCAOp
|
class CMSITSCAOpTypeBoolean : public CMSITSCAOp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMSITSCAOpBooleanOperation(BOOL bValue = TRUE, int iTicks = 0);
|
CMSITSCAOpTypeBoolean(BOOL bValue = TRUE, int iTicks = 0);
|
||||||
|
|
||||||
friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpBooleanOperation &op);
|
friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpTypeBoolean &op);
|
||||||
friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpBooleanOperation &op);
|
friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpTypeBoolean &op);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BOOL m_bValue;
|
BOOL m_bValue;
|
||||||
@ -86,62 +86,63 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// CMSITSCAOpEnableRollback
|
// CMSITSCAOpRollbackEnable
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class CMSITSCAOpEnableRollback : public CMSITSCAOpBooleanOperation
|
class CMSITSCAOpRollbackEnable : public CMSITSCAOpTypeBoolean
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMSITSCAOpEnableRollback(BOOL bEnable = TRUE, int iTicks = 0);
|
CMSITSCAOpRollbackEnable(BOOL bEnable = TRUE, int iTicks = 0);
|
||||||
virtual HRESULT Execute(CMSITSCASession *pSession);
|
virtual HRESULT Execute(CMSITSCASession *pSession);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// CMSITSCAOpDeleteFile
|
// CMSITSCAOpFileDelete
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class CMSITSCAOpDeleteFile : public CMSITSCAOpSingleStringOperation
|
class CMSITSCAOpFileDelete : public CMSITSCAOpTypeSingleString
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMSITSCAOpDeleteFile(LPCWSTR pszFileName = L"", int iTicks = 0);
|
CMSITSCAOpFileDelete(LPCWSTR pszFileName = L"", int iTicks = 0);
|
||||||
virtual HRESULT Execute(CMSITSCASession *pSession);
|
virtual HRESULT Execute(CMSITSCASession *pSession);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// CMSITSCAOpMoveFile
|
// CMSITSCAOpFileMove
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class CMSITSCAOpMoveFile : public CMSITSCAOpSrcDstStringOperation
|
class CMSITSCAOpFileMove : public CMSITSCAOpTypeSrcDstString
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMSITSCAOpMoveFile(LPCWSTR pszFileSrc = L"", LPCWSTR pszFileDst = L"", int iTicks = 0);
|
CMSITSCAOpFileMove(LPCWSTR pszFileSrc = L"", LPCWSTR pszFileDst = L"", int iTicks = 0);
|
||||||
virtual HRESULT Execute(CMSITSCASession *pSession);
|
virtual HRESULT Execute(CMSITSCASession *pSession);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// CMSITSCAOpCreateTask
|
// CMSITSCAOpTaskCreate
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class CMSITSCAOpCreateTask : public CMSITSCAOpSingleStringOperation
|
class CMSITSCAOpTaskCreate : public CMSITSCAOpTypeSingleString
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMSITSCAOpCreateTask(LPCWSTR pszTaskName = L"", int iTicks = 0);
|
CMSITSCAOpTaskCreate(LPCWSTR pszTaskName = L"", int iTicks = 0);
|
||||||
virtual ~CMSITSCAOpCreateTask();
|
virtual ~CMSITSCAOpTaskCreate();
|
||||||
virtual HRESULT Execute(CMSITSCASession *pSession);
|
virtual HRESULT Execute(CMSITSCASession *pSession);
|
||||||
|
|
||||||
UINT SetFromRecord(MSIHANDLE hInstall, MSIHANDLE hRecord);
|
UINT SetFromRecord(MSIHANDLE hInstall, MSIHANDLE hRecord);
|
||||||
UINT SetTriggersFromView(MSIHANDLE hView);
|
UINT SetTriggersFromView(MSIHANDLE hView);
|
||||||
|
|
||||||
friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpCreateTask &op);
|
friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpTaskCreate &op);
|
||||||
friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpCreateTask &op);
|
friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpTaskCreate &op);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CStringW m_sApplicationName;
|
CStringW m_sApplicationName;
|
||||||
CStringW m_sParameters;
|
CStringW m_sParameters;
|
||||||
CStringW m_sWorkingDirectory;
|
CStringW m_sWorkingDirectory;
|
||||||
|
CStringW m_sAuthor;
|
||||||
CStringW m_sComment;
|
CStringW m_sComment;
|
||||||
DWORD m_dwFlags;
|
DWORD m_dwFlags;
|
||||||
DWORD m_dwPriority;
|
DWORD m_dwPriority;
|
||||||
@ -156,29 +157,29 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// CMSITSCAOpDeleteTask
|
// CMSITSCAOpTaskDelete
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class CMSITSCAOpDeleteTask : public CMSITSCAOpSingleStringOperation
|
class CMSITSCAOpTaskDelete : public CMSITSCAOpTypeSingleString
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMSITSCAOpDeleteTask(LPCWSTR pszTaskName = L"", int iTicks = 0);
|
CMSITSCAOpTaskDelete(LPCWSTR pszTaskName = L"", int iTicks = 0);
|
||||||
virtual HRESULT Execute(CMSITSCASession *pSession);
|
virtual HRESULT Execute(CMSITSCASession *pSession);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// CMSITSCAOpEnableTask
|
// CMSITSCAOpTaskEnable
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class CMSITSCAOpEnableTask : public CMSITSCAOpSingleStringOperation
|
class CMSITSCAOpTaskEnable : public CMSITSCAOpTypeSingleString
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMSITSCAOpEnableTask(LPCWSTR pszTaskName = L"", BOOL bEnable = TRUE, int iTicks = 0);
|
CMSITSCAOpTaskEnable(LPCWSTR pszTaskName = L"", BOOL bEnable = TRUE, int iTicks = 0);
|
||||||
virtual HRESULT Execute(CMSITSCASession *pSession);
|
virtual HRESULT Execute(CMSITSCASession *pSession);
|
||||||
|
|
||||||
friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpEnableTask &op);
|
friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpTaskEnable &op);
|
||||||
friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpEnableTask &op);
|
friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpTaskEnable &op);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BOOL m_bEnable;
|
BOOL m_bEnable;
|
||||||
@ -186,13 +187,13 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// CMSITSCAOpCopyTask
|
// CMSITSCAOpTaskCopy
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class CMSITSCAOpCopyTask : public CMSITSCAOpSrcDstStringOperation
|
class CMSITSCAOpTaskCopy : public CMSITSCAOpTypeSrcDstString
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMSITSCAOpCopyTask(LPCWSTR pszTaskSrc = L"", LPCWSTR pszTaskDst = L"", int iTicks = 0);
|
CMSITSCAOpTaskCopy(LPCWSTR pszTaskSrc = L"", LPCWSTR pszTaskDst = L"", int iTicks = 0);
|
||||||
virtual HRESULT Execute(CMSITSCASession *pSession);
|
virtual HRESULT Execute(CMSITSCASession *pSession);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -242,12 +243,11 @@ class CMSITSCASession
|
|||||||
public:
|
public:
|
||||||
CMSITSCASession();
|
CMSITSCASession();
|
||||||
|
|
||||||
MSIHANDLE m_hInstall; // Installer handle
|
MSIHANDLE m_hInstall; // Installer handle
|
||||||
CComPtr<ITaskScheduler> m_pTaskScheduler; // Task scheduler interface
|
BOOL m_bContinueOnError; // Continue execution on operation error?
|
||||||
BOOL m_bContinueOnError; // Continue execution on operation error?
|
BOOL m_bRollbackEnabled; // Is rollback enabled?
|
||||||
BOOL m_bRollbackEnabled; // Is rollback enabled?
|
CMSITSCAOpList m_olRollback; // Rollback operation list
|
||||||
CMSITSCAOpList m_olRollback; // Rollback operation list
|
CMSITSCAOpList m_olCommit; // Commit operation list
|
||||||
CMSITSCAOpList m_olCommit; // Commit operation list
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ inline HRESULT operator >>(CAtlFile &f, CMSITSCAOp &op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpSingleStringOperation &op)
|
inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpTypeSingleString &op)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
@ -278,7 +278,7 @@ inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpSingleStringOperation &o
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpSingleStringOperation &op)
|
inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpTypeSingleString &op)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpSingleStringOperation &op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpSrcDstStringOperation &op)
|
inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpTypeSrcDstString &op)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
@ -303,7 +303,7 @@ inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpSrcDstStringOperation &o
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpSrcDstStringOperation &op)
|
inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpTypeSrcDstString &op)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
@ -317,7 +317,7 @@ inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpSrcDstStringOperation &op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpBooleanOperation &op)
|
inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpTypeBoolean &op)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
@ -328,7 +328,7 @@ inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpBooleanOperation &op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpBooleanOperation &op)
|
inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpTypeBoolean &op)
|
||||||
{
|
{
|
||||||
int iValue;
|
int iValue;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
@ -344,15 +344,16 @@ inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpBooleanOperation &op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpCreateTask &op)
|
inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpTaskCreate &op)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
POSITION pos;
|
POSITION pos;
|
||||||
|
|
||||||
hr = f << (const CMSITSCAOpSingleStringOperation&)op; if (FAILED(hr)) return hr;
|
hr = f << (const CMSITSCAOpTypeSingleString&)op; if (FAILED(hr)) return hr;
|
||||||
hr = f << op.m_sApplicationName; if (FAILED(hr)) return hr;
|
hr = f << op.m_sApplicationName; if (FAILED(hr)) return hr;
|
||||||
hr = f << op.m_sParameters; if (FAILED(hr)) return hr;
|
hr = f << op.m_sParameters; if (FAILED(hr)) return hr;
|
||||||
hr = f << op.m_sWorkingDirectory; if (FAILED(hr)) return hr;
|
hr = f << op.m_sWorkingDirectory; if (FAILED(hr)) return hr;
|
||||||
|
hr = f << op.m_sAuthor; if (FAILED(hr)) return hr;
|
||||||
hr = f << op.m_sComment; if (FAILED(hr)) return hr;
|
hr = f << op.m_sComment; if (FAILED(hr)) return hr;
|
||||||
hr = f << (int)op.m_dwFlags; if (FAILED(hr)) return hr;
|
hr = f << (int)op.m_dwFlags; if (FAILED(hr)) return hr;
|
||||||
hr = f << (int)op.m_dwPriority; if (FAILED(hr)) return hr;
|
hr = f << (int)op.m_dwPriority; if (FAILED(hr)) return hr;
|
||||||
@ -370,15 +371,16 @@ inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpCreateTask &op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpCreateTask &op)
|
inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpTaskCreate &op)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
DWORD dwValue;
|
DWORD dwValue;
|
||||||
|
|
||||||
hr = f >> (CMSITSCAOpSingleStringOperation&)op; if (FAILED(hr)) return hr;
|
hr = f >> (CMSITSCAOpTypeSingleString&)op; if (FAILED(hr)) return hr;
|
||||||
hr = f >> op.m_sApplicationName; if (FAILED(hr)) return hr;
|
hr = f >> op.m_sApplicationName; if (FAILED(hr)) return hr;
|
||||||
hr = f >> op.m_sParameters; if (FAILED(hr)) return hr;
|
hr = f >> op.m_sParameters; if (FAILED(hr)) return hr;
|
||||||
hr = f >> op.m_sWorkingDirectory; if (FAILED(hr)) return hr;
|
hr = f >> op.m_sWorkingDirectory; if (FAILED(hr)) return hr;
|
||||||
|
hr = f >> op.m_sAuthor; if (FAILED(hr)) return hr;
|
||||||
hr = f >> op.m_sComment; if (FAILED(hr)) return hr;
|
hr = f >> op.m_sComment; if (FAILED(hr)) return hr;
|
||||||
hr = f >> (int&)op.m_dwFlags; if (FAILED(hr)) return hr;
|
hr = f >> (int&)op.m_dwFlags; if (FAILED(hr)) return hr;
|
||||||
hr = f >> (int&)op.m_dwPriority; if (FAILED(hr)) return hr;
|
hr = f >> (int&)op.m_dwPriority; if (FAILED(hr)) return hr;
|
||||||
@ -398,23 +400,23 @@ inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpCreateTask &op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpEnableTask &op)
|
inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpTaskEnable &op)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
hr = f << (const CMSITSCAOpSingleStringOperation&)op;
|
hr = f << (const CMSITSCAOpTypeSingleString&)op;
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
|
|
||||||
return f << (int)op.m_bEnable;
|
return f << (int)op.m_bEnable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpEnableTask &op)
|
inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpTaskEnable &op)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
int iTemp;
|
int iTemp;
|
||||||
|
|
||||||
hr = f >> (CMSITSCAOpSingleStringOperation&)op;
|
hr = f >> (CMSITSCAOpTypeSingleString&)op;
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
|
|
||||||
hr = f >> iTemp;
|
hr = f >> iTemp;
|
||||||
@ -438,20 +440,20 @@ inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpList &list)
|
|||||||
|
|
||||||
for (pos = list.GetHeadPosition(); pos;) {
|
for (pos = list.GetHeadPosition(); pos;) {
|
||||||
const CMSITSCAOp *pOp = list.GetNext(pos);
|
const CMSITSCAOp *pOp = list.GetNext(pos);
|
||||||
if (dynamic_cast<const CMSITSCAOpEnableRollback*>(pOp))
|
if (dynamic_cast<const CMSITSCAOpRollbackEnable*>(pOp))
|
||||||
hr = list.Save<CMSITSCAOpEnableRollback, CMSITSCAOpList::OPERATION_ENABLE_ROLLBACK>(f, pOp);
|
hr = list.Save<CMSITSCAOpRollbackEnable, CMSITSCAOpList::OPERATION_ENABLE_ROLLBACK>(f, pOp);
|
||||||
else if (dynamic_cast<const CMSITSCAOpDeleteFile*>(pOp))
|
else if (dynamic_cast<const CMSITSCAOpFileDelete*>(pOp))
|
||||||
hr = list.Save<CMSITSCAOpDeleteFile, CMSITSCAOpList::OPERATION_DELETE_FILE>(f, pOp);
|
hr = list.Save<CMSITSCAOpFileDelete, CMSITSCAOpList::OPERATION_DELETE_FILE>(f, pOp);
|
||||||
else if (dynamic_cast<const CMSITSCAOpMoveFile*>(pOp))
|
else if (dynamic_cast<const CMSITSCAOpFileMove*>(pOp))
|
||||||
hr = list.Save<CMSITSCAOpMoveFile, CMSITSCAOpList::OPERATION_MOVE_FILE>(f, pOp);
|
hr = list.Save<CMSITSCAOpFileMove, CMSITSCAOpList::OPERATION_MOVE_FILE>(f, pOp);
|
||||||
else if (dynamic_cast<const CMSITSCAOpCreateTask*>(pOp))
|
else if (dynamic_cast<const CMSITSCAOpTaskCreate*>(pOp))
|
||||||
hr = list.Save<CMSITSCAOpCreateTask, CMSITSCAOpList::OPERATION_CREATE_TASK>(f, pOp);
|
hr = list.Save<CMSITSCAOpTaskCreate, CMSITSCAOpList::OPERATION_CREATE_TASK>(f, pOp);
|
||||||
else if (dynamic_cast<const CMSITSCAOpDeleteTask*>(pOp))
|
else if (dynamic_cast<const CMSITSCAOpTaskDelete*>(pOp))
|
||||||
hr = list.Save<CMSITSCAOpDeleteTask, CMSITSCAOpList::OPERATION_DELETE_TASK>(f, pOp);
|
hr = list.Save<CMSITSCAOpTaskDelete, CMSITSCAOpList::OPERATION_DELETE_TASK>(f, pOp);
|
||||||
else if (dynamic_cast<const CMSITSCAOpEnableTask*>(pOp))
|
else if (dynamic_cast<const CMSITSCAOpTaskEnable*>(pOp))
|
||||||
hr = list.Save<CMSITSCAOpEnableTask, CMSITSCAOpList::OPERATION_ENABLE_TASK>(f, pOp);
|
hr = list.Save<CMSITSCAOpTaskEnable, CMSITSCAOpList::OPERATION_ENABLE_TASK>(f, pOp);
|
||||||
else if (dynamic_cast<const CMSITSCAOpCopyTask*>(pOp))
|
else if (dynamic_cast<const CMSITSCAOpTaskCopy*>(pOp))
|
||||||
hr = list.Save<CMSITSCAOpCopyTask, CMSITSCAOpList::OPERATION_COPY_TASK>(f, pOp);
|
hr = list.Save<CMSITSCAOpTaskCopy, CMSITSCAOpList::OPERATION_COPY_TASK>(f, pOp);
|
||||||
else if (dynamic_cast<const CMSITSCAOpList*>(pOp))
|
else if (dynamic_cast<const CMSITSCAOpList*>(pOp))
|
||||||
hr = list.Save<CMSITSCAOpList, CMSITSCAOpList::OPERATION_SUBLIST>(f, pOp);
|
hr = list.Save<CMSITSCAOpList, CMSITSCAOpList::OPERATION_SUBLIST>(f, pOp);
|
||||||
else {
|
else {
|
||||||
@ -486,25 +488,25 @@ inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpList &list)
|
|||||||
|
|
||||||
switch ((CMSITSCAOpList::OPERATION)iTemp) {
|
switch ((CMSITSCAOpList::OPERATION)iTemp) {
|
||||||
case CMSITSCAOpList::OPERATION_ENABLE_ROLLBACK:
|
case CMSITSCAOpList::OPERATION_ENABLE_ROLLBACK:
|
||||||
hr = list.LoadAndAddTail<CMSITSCAOpEnableRollback>(f);
|
hr = list.LoadAndAddTail<CMSITSCAOpRollbackEnable>(f);
|
||||||
break;
|
break;
|
||||||
case CMSITSCAOpList::OPERATION_DELETE_FILE:
|
case CMSITSCAOpList::OPERATION_DELETE_FILE:
|
||||||
hr = list.LoadAndAddTail<CMSITSCAOpDeleteFile>(f);
|
hr = list.LoadAndAddTail<CMSITSCAOpFileDelete>(f);
|
||||||
break;
|
break;
|
||||||
case CMSITSCAOpList::OPERATION_MOVE_FILE:
|
case CMSITSCAOpList::OPERATION_MOVE_FILE:
|
||||||
hr = list.LoadAndAddTail<CMSITSCAOpMoveFile>(f);
|
hr = list.LoadAndAddTail<CMSITSCAOpFileMove>(f);
|
||||||
break;
|
break;
|
||||||
case CMSITSCAOpList::OPERATION_CREATE_TASK:
|
case CMSITSCAOpList::OPERATION_CREATE_TASK:
|
||||||
hr = list.LoadAndAddTail<CMSITSCAOpCreateTask>(f);
|
hr = list.LoadAndAddTail<CMSITSCAOpTaskCreate>(f);
|
||||||
break;
|
break;
|
||||||
case CMSITSCAOpList::OPERATION_DELETE_TASK:
|
case CMSITSCAOpList::OPERATION_DELETE_TASK:
|
||||||
hr = list.LoadAndAddTail<CMSITSCAOpDeleteTask>(f);
|
hr = list.LoadAndAddTail<CMSITSCAOpTaskDelete>(f);
|
||||||
break;
|
break;
|
||||||
case CMSITSCAOpList::OPERATION_ENABLE_TASK:
|
case CMSITSCAOpList::OPERATION_ENABLE_TASK:
|
||||||
hr = list.LoadAndAddTail<CMSITSCAOpEnableTask>(f);
|
hr = list.LoadAndAddTail<CMSITSCAOpTaskEnable>(f);
|
||||||
break;
|
break;
|
||||||
case CMSITSCAOpList::OPERATION_COPY_TASK:
|
case CMSITSCAOpList::OPERATION_COPY_TASK:
|
||||||
hr = list.LoadAndAddTail<CMSITSCAOpCopyTask>(f);
|
hr = list.LoadAndAddTail<CMSITSCAOpTaskCopy>(f);
|
||||||
break;
|
break;
|
||||||
case CMSITSCAOpList::OPERATION_SUBLIST:
|
case CMSITSCAOpList::OPERATION_SUBLIST:
|
||||||
hr = list.LoadAndAddTail<CMSITSCAOpList>(f);
|
hr = list.LoadAndAddTail<CMSITSCAOpList>(f);
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
- Naredi še o(ne)mogoèanje opravil z uporabo Task Scheduler 2.0.
|
|
||||||
- Preizkusi vse nastavitve opravila in vrste sprožilcev, èe se pravilno izdelajo.
|
|
||||||
- Tudi akcije deferred/commit/rollback naj pošiljajo obvestila o napakah.
|
|
@ -20,7 +20,8 @@
|
|||||||
#define _WIN32_WINNT 0x0501 // Include Windows XP symbols
|
#define _WIN32_WINNT 0x0501 // Include Windows XP symbols
|
||||||
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
|
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
|
||||||
#ifdef _WINDLL
|
#ifdef _WINDLL
|
||||||
#define MSITSCA_DLL // Gradimo knjižnico DLL
|
#define MSITSCA_DLL // This is a DLL
|
||||||
|
//#ifdef ASSERT_TO_DEBUG // Enable false asserts to provide opportunity to attach debuger
|
||||||
#endif
|
#endif
|
||||||
#define _ATL_APARTMENT_THREADED
|
#define _ATL_APARTMENT_THREADED
|
||||||
#define _ATL_NO_AUTOMATIC_NAMESPACE
|
#define _ATL_NO_AUTOMATIC_NAMESPACE
|
||||||
|
@ -2,7 +2,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: MSITSCA\n"
|
"Project-Id-Version: MSITSCA\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2012-12-24 14:20+0100\n"
|
"POT-Creation-Date: 2013-01-09 12:10+0100\n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
||||||
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
|
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
|
||||||
"Language-Team: Amebis, d. o. o., Kamnik <simon.rozman@amebis.si>\n"
|
"Language-Team: Amebis, d. o. o., Kamnik <simon.rozman@amebis.si>\n"
|
||||||
@ -36,6 +36,10 @@ msgstr "0x409"
|
|||||||
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:3
|
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:3
|
||||||
#: ..\MSI/Sl.DebugU.x64.ActionText-2.idtx:3
|
#: ..\MSI/Sl.DebugU.x64.ActionText-2.idtx:3
|
||||||
#: ..\MSI/Sl.DebugU.x64.Error-2.idtx:3
|
#: ..\MSI/Sl.DebugU.x64.Error-2.idtx:3
|
||||||
|
#: ..\MSI/Sl.ReleaseU.Win32.ActionText-2.idtx:3
|
||||||
|
#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:3
|
||||||
|
#: ..\MSI/Sl.ReleaseU.x64.ActionText-2.idtx:3
|
||||||
|
#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:3
|
||||||
msgid "1250"
|
msgid "1250"
|
||||||
msgstr "1252"
|
msgstr "1252"
|
||||||
|
|
||||||
@ -72,44 +76,116 @@ msgstr "Copyright © Amebis, d. o. o., Kamnik, 2012"
|
|||||||
|
|
||||||
# !!! Lektorirati !!!
|
# !!! Lektorirati !!!
|
||||||
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:8 ..\MSI/Sl.DebugU.x64.Error-2.idtx:8
|
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:8 ..\MSI/Sl.DebugU.x64.Error-2.idtx:8
|
||||||
msgid "Pri brisanju datoteke »[2]« je prišlo do napake [3]."
|
#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:8
|
||||||
msgstr "Error [3] deleting \"[2]\" file."
|
#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:8
|
||||||
|
msgid ""
|
||||||
|
"Pri brisanju datoteke »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
||||||
|
"tehnično službo."
|
||||||
|
msgstr "Error [3] deleting \"[2]\" file. Contact your support personnel."
|
||||||
|
|
||||||
|
# !!! Lektorirati !!!
|
||||||
|
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:11 ..\MSI/Sl.DebugU.x64.Error-2.idtx:11
|
||||||
|
#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:11
|
||||||
|
#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:11
|
||||||
|
msgid ""
|
||||||
|
"Pri brisanju razporejenega opravila »[2]« je prišlo do napake [3]. Obrnite "
|
||||||
|
"se na svojo tehnično službo."
|
||||||
|
msgstr ""
|
||||||
|
"Error [3] deleting \"[2]\" scheduled task. Contact your support personnel."
|
||||||
|
|
||||||
|
# !!! Lektorirati !!!
|
||||||
|
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:13 ..\MSI/Sl.DebugU.x64.Error-2.idtx:13
|
||||||
|
#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:13
|
||||||
|
#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:13
|
||||||
|
msgid ""
|
||||||
|
"Pri kopiranju razporejenega opravila »[2]« v »[3]« je prišlo do napake [4]. "
|
||||||
|
"Obrnite se na svojo tehnično službo."
|
||||||
|
msgstr ""
|
||||||
|
"Error [4] copying \"[2]\" scheduled task to \"[3]\". Contact your support "
|
||||||
|
"personnel."
|
||||||
|
|
||||||
# !!! Lektorirati !!!
|
# !!! Lektorirati !!!
|
||||||
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:7 ..\MSI/Sl.DebugU.x64.Error-2.idtx:7
|
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:7 ..\MSI/Sl.DebugU.x64.Error-2.idtx:7
|
||||||
msgid "Pri nastavljanju parametra »[2]« je prišlo do napake [3]."
|
#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:7
|
||||||
msgstr "Error [3] setting \"[2]\" parameter."
|
#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:7
|
||||||
|
msgid ""
|
||||||
|
"Pri nastavljanju parametra »[2]« je prišlo do napake [3]. Obrnite se na "
|
||||||
|
"svojo tehnično službo."
|
||||||
|
msgstr "Error [3] setting \"[2]\" parameter. Contact your support personnel."
|
||||||
|
|
||||||
|
# !!! Lektorirati !!!
|
||||||
|
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:12 ..\MSI/Sl.DebugU.x64.Error-2.idtx:12
|
||||||
|
#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:12
|
||||||
|
#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:12
|
||||||
|
msgid ""
|
||||||
|
"Pri o(ne)mogočanju razporejenega opravila »[2]« je prišlo do napake [3]. "
|
||||||
|
"Obrnite se na svojo tehnično službo."
|
||||||
|
msgstr ""
|
||||||
|
"Error [3] enabling/disabling \"[2]\" scheduled task. Contact your support "
|
||||||
|
"personnel."
|
||||||
|
|
||||||
# !!! Lektorirati !!!
|
# !!! Lektorirati !!!
|
||||||
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:4 ..\MSI/Sl.DebugU.x64.Error-2.idtx:4
|
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:4 ..\MSI/Sl.DebugU.x64.Error-2.idtx:4
|
||||||
msgid "Pri odpiranju namestitvenega paketa je prišlo do napake."
|
#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:4
|
||||||
msgstr "Error opening installation package."
|
#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:4
|
||||||
|
msgid ""
|
||||||
|
"Pri odpiranju namestitvenega paketa je prišlo do napake. Obrnite se na svojo "
|
||||||
|
"tehnično službo."
|
||||||
|
msgstr "Error opening installation package. Contact your support personnel."
|
||||||
|
|
||||||
# !!! Lektorirati !!!
|
# !!! Lektorirati !!!
|
||||||
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:6 ..\MSI/Sl.DebugU.x64.Error-2.idtx:6
|
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:6 ..\MSI/Sl.DebugU.x64.Error-2.idtx:6
|
||||||
|
#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:6
|
||||||
|
#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:6
|
||||||
msgid ""
|
msgid ""
|
||||||
"Pri pisanju v datoteko seznama razporejenih opravil »[2]« je prišlo do "
|
"Pri pisanju v datoteko seznama razporejenih opravil »[2]« je prišlo do "
|
||||||
"napake [3]."
|
"napake [3]. Obrnite se na svojo tehnično službo."
|
||||||
msgstr "Error [3] writing to \"[2]\" scheduled task list file."
|
msgstr ""
|
||||||
|
"Error [3] writing to \"[2]\" scheduled task list file. Contact your support "
|
||||||
|
"personnel."
|
||||||
|
|
||||||
# !!! Lektorirati !!!
|
# !!! Lektorirati !!!
|
||||||
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:9 ..\MSI/Sl.DebugU.x64.Error-2.idtx:9
|
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:9 ..\MSI/Sl.DebugU.x64.Error-2.idtx:9
|
||||||
msgid "Pri premikanju datoteke »[2]« v »[3]« je prišlo do napake [4]."
|
#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:9
|
||||||
msgstr "Error [4] moving \"[2]\" file to \"[3]\"."
|
#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:9
|
||||||
|
msgid ""
|
||||||
|
"Pri premikanju datoteke »[2]« v »[3]« je prišlo do napake [4]. Obrnite se na "
|
||||||
|
"svojo tehnično službo."
|
||||||
|
msgstr ""
|
||||||
|
"Error [4] moving \"[2]\" file to \"[3]\". Contact your support personnel."
|
||||||
|
|
||||||
# !!! Lektorirati !!!
|
# !!! Lektorirati !!!
|
||||||
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:5 ..\MSI/Sl.DebugU.x64.Error-2.idtx:5
|
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:5 ..\MSI/Sl.DebugU.x64.Error-2.idtx:5
|
||||||
msgid "Pri pripravi seznama razvrščenih opravil je prišlo do napake [2]."
|
#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:5
|
||||||
msgstr "Error [2] creating scheduled task list."
|
#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:5
|
||||||
|
msgid ""
|
||||||
|
"Pri pripravi seznama razvrščenih opravil je prišlo do napake [2]. Obrnite se "
|
||||||
|
"na svojo tehnično službo."
|
||||||
|
msgstr ""
|
||||||
|
"Error [2] creating scheduled task list. Contact your support personnel."
|
||||||
|
|
||||||
|
# !!! Lektorirati !!!
|
||||||
|
#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:10 ..\MSI/Sl.DebugU.x64.Error-2.idtx:10
|
||||||
|
#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:10
|
||||||
|
#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:10
|
||||||
|
msgid ""
|
||||||
|
"Pri ustvarjanju razporejenega opravila »[2]« je prišlo do napake [3]. "
|
||||||
|
"Obrnite se na svojo tehnično službo."
|
||||||
|
msgstr ""
|
||||||
|
"Error [3] creating \"[2]\" scheduled task. Contact your support personnel."
|
||||||
|
|
||||||
# !!! Lektorirati !!!
|
# !!! Lektorirati !!!
|
||||||
#: ..\MSI/Sl.DebugU.Win32.ActionText-2.idtx:4
|
#: ..\MSI/Sl.DebugU.Win32.ActionText-2.idtx:4
|
||||||
#: ..\MSI/Sl.DebugU.x64.ActionText-2.idtx:4
|
#: ..\MSI/Sl.DebugU.x64.ActionText-2.idtx:4
|
||||||
|
#: ..\MSI/Sl.ReleaseU.Win32.ActionText-2.idtx:4
|
||||||
|
#: ..\MSI/Sl.ReleaseU.x64.ActionText-2.idtx:4
|
||||||
msgid "Razporejeno opravilo: [1]"
|
msgid "Razporejeno opravilo: [1]"
|
||||||
msgstr "Scheduled task: [1]"
|
msgstr "Scheduled task: [1]"
|
||||||
|
|
||||||
# !!! Lektorirati !!!
|
# !!! Lektorirati !!!
|
||||||
#: ..\MSI/Sl.DebugU.Win32.ActionText-2.idtx:4
|
#: ..\MSI/Sl.DebugU.Win32.ActionText-2.idtx:4
|
||||||
#: ..\MSI/Sl.DebugU.x64.ActionText-2.idtx:4
|
#: ..\MSI/Sl.DebugU.x64.ActionText-2.idtx:4
|
||||||
|
#: ..\MSI/Sl.ReleaseU.Win32.ActionText-2.idtx:4
|
||||||
|
#: ..\MSI/Sl.ReleaseU.x64.ActionText-2.idtx:4
|
||||||
msgid "Registracija razporejenih opravil"
|
msgid "Registracija razporejenih opravil"
|
||||||
msgstr "Registering scheduled tasks"
|
msgstr "Registering scheduled tasks"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user