1. 2014.03.04 ITaskSettings interface
  2. 2014.03.03 ILogonTrigger interface
  3. 2013.02.06 Shellexecute()
  4. 2013.01.16 PathFindSuffixArray 경로에 찾고자 하는 문자열 있는지 확인

ITaskSettings interface

Properties

The ITaskSettings interface has these properties.

PropertyAccess typeDescription

AllowDemandStart(요청 시 작업이 실행되도록 허용)

Read/write

Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu.

사용 예)

put_AllowDemandStart(VARIANT_FALSE);

AllowHardTerminate(요청할 때 실행 중인 작업이 끝나지 않으면 강제로 작업 중지)

Read/write

Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess.

사용 예)

put_AllowHardTerminate(VARIANT_FALSE); // 작업 중지

Compatibility

Read/write

Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with.

DeleteExpiredTaskAfter

Read/write

Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires.

DisallowStartIfOnBatteries(컴퓨터의 AC 전원이 켜져 있는 경우에만 작업 시작)

Read/write

Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power.

Enabled

Read/write

Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting istrue.

ExecutionTimeLimit

Read/write

Gets or sets the amount of time that is allowed to complete the task.

Hidden(숨김)

Read/write

Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default.

사용 예)

put_Hidden(VARIANT_TRUE)

IdleSettings

Read/write

Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state.

MultipleInstances

Read/write

Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task.

NetworkSettings

Gets or sets the network settings object that contains a network profile identifier and name. If theRunOnlyIfNetworkAvailable property of ITaskSettings is trueand a network propfile is specified in the NetworkSettingsproperty, then the task will run only if the specified network profile is available.

Priority

Read/write

Gets or sets the priority level of the task.

RestartCount(다음 횟수까지 다시 시작 시도)

Read/write

Gets or sets the number of times that the Task Scheduler will attempt to restart the task.

사용 예)

put_RestartCount(10);

RestartInterval(작업이 실패하는 경우 다시 시작 간격)

Read/write

Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task.

사용 예)

put_RestartInterval(_bstr_t(L"PT5M"));

RunOnlyIfNetworkAvailable(다음 네트워크 연결을 사용할 수 있는 경우에만 시작)

Read/write

Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available.

put_RunOnlyIfNetworkAvailable(VARIANT_TRUE)

StartWhenAvailable(예약된 시작 시간을 놓친 경우 가능한 대로 빨리 작업 시작)


Read/write

Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed.

put_StartWhenAvailable(VARIANT_TRUE);

StopIfGoingOnBatteries()

(컴퓨터 배터리 전원으로 전환되는 경우 중지)

Read/write

Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power.


WakeToRun(이 작업을 실행하기 위해 절전 모드 종료)

Read/write

Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer before it runs the task.

put_WakeToRun(VARIANT_TRUE);

XmlText

Read/write

Gets or sets an XML-formatted definition of the task settings.

 

'c/c++ > 레퍼런스' 카테고리의 다른 글

ILogonTrigger interface  (0) 2014.03.03
Shellexecute()  (0) 2013.02.06
PathFindSuffixArray 경로에 찾고자 하는 문자열 있는지 확인  (0) 2013.01.16

ILogonTrigger interface


Properties

The ILogonTrigger interface has these properties.


PropertyAccess typeDescription

Delay (작업 지연 시간)

Read/write

Gets or sets a value that indicates the amount of time between when the user logs on and when the job is started.

Enabled(사용)

Read/write

Inherited from the ITrigger interface. Gets or sets a Boolean value that indicates whether the trigger is enabled.

EndBoundary(만료)

Read/write

Inherited from the ITrigger interface. Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated.


사용 예)

put_EndBoundary(_bstr_t(L"2015-05-02T08:00:00"))

ExecutionTimeLimit (다음 기간 이상 실행되는 작업 중지)

Read/write

Inherited from the ITrigger interface. Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run.

Id

Read/write

Inherited from the ITrigger interface. Gets or sets the identifier for the trigger.

Repetition (작업 반복 간격)

Read/write

Inherited from the ITrigger interface. Gets or sets a value that indicates how often the task is run and how long the repetition pattern is repeated after the task is started.

StartBoundary (활성화)

Read/write

Inherited from the ITrigger interface. Gets or sets the date and time when the trigger is activated.


사용 예)

put_StartBoundary(_bstr_t(L"2014-01-01T12:05:00"));

Type(작업 시작)

Read-only

Inherited from the ITrigger interface. Gets the type of the trigger.

TASK_TRIGGER_EVENT 이벤트 상태

TASK_TRIGGER_TIME 매일 지정된 시간

TASK_TRIGGER_DAILY 매일

TASK_TRIGGER_WEEKLY 매주

TASK_TRIGGER_MONTHLY 매달

TASK_TRIGGER_MONTHLYDOW 매달 지정된 날 

TASK_TRIGGER_IDLE 유휴 상태

TASK_TRIGGER_REGISTRATION 등록 되었을 때

TASK_TRIGGER_BOOT 시작할 때

TASK_TRIGGER_LOGON 로그온할 때

TASK_TRIGGER_SESSION_STATE_CHANGE 세션 상태 변경

UserId(특정 사용자)

Read/write

Gets or sets the identifier of the user.

NULL 모든 사용자 put_UserId() 로 사용자를 지정해주지 않으면 됨


 

'c/c++ > 레퍼런스' 카테고리의 다른 글

ITaskSettings interface  (0) 2014.03.04
Shellexecute()  (0) 2013.02.06
PathFindSuffixArray 경로에 찾고자 하는 문자열 있는지 확인  (0) 2013.01.16

Shellexecute()

1. 응용프로그램 실행

ShellExcute(NULL, "open", "c:\\test.txt", NULL, NULL, SW_SHWONORMAL);

2. 특정 프로그램으로 원하는 파일 열기

3. 인터넷 익스플로러 사용하기

ShellExcute(NULL, "open", "iexplore", "http://www.tistory.com", NULL, SW_SHWONORMAL);

4. 응용프로그램의 인쇄 기능 사용하기

ShellExcute(NULL, "print", "c:\\test.txt", NULL, NULL, SW_SHWONORMAL);

5. 탐색기 실행

ShellExcute(NULL, "open", "explorer","c:\\test", NULL, SW_SHOW);

'c/c++ > 레퍼런스' 카테고리의 다른 글

ITaskSettings interface  (0) 2014.03.04
ILogonTrigger interface  (0) 2014.03.03
PathFindSuffixArray 경로에 찾고자 하는 문자열 있는지 확인  (0) 2013.01.16

PathFindSuffixArray 경로에 찾고자 하는 문자열 있는지 확인

#include <stdio.h>

#include <Windows.h>

#include <shlwapi.h>


#pragma comment(lib, "shlwapi.lib")



int main()

{

char lpPath[] = "c:\\Windows\\System32\\notepad.exe";

char *apszSuffix[] = {"zip", "exe", "txt"};

int nSuffixSize = sizeof(apszSuffix) / sizeof(apszSuffix[0]);

const char *lpMathedSuffix;


lpMathedSuffix = PathFindSuffixArray(lpPath, apszSuffix, nSuffixSize);


if(lpMathedSuffix != NULL)

printf("Match : %s\n", lpMathedSuffix);

else

puts("Suffix does not matched");


return 0;

}


'c/c++ > 레퍼런스' 카테고리의 다른 글

ITaskSettings interface  (0) 2014.03.04
ILogonTrigger interface  (0) 2014.03.03
Shellexecute()  (0) 2013.02.06