#include "initguid.h"
#include "taskschd.h"
#include "wine/debug.h"
#include "wine/unicode.h"
Go to the source code of this file.
|
| static const WCHAR | change_optW [] = {'/','c','h','a','n','g','e',0} |
| |
| static const WCHAR | create_optW [] = {'/','c','r','e','a','t','e',0} |
| |
| static const WCHAR | delete_optW [] = {'/','d','e','l','e','t','e',0} |
| |
| static const WCHAR | enable_optW [] = {'/','e','n','a','b','l','e',0} |
| |
| static const WCHAR | f_optW [] = {'/','f',0} |
| |
| static const WCHAR | ru_optW [] = {'/','r','u',0} |
| |
| static const WCHAR | tn_optW [] = {'/','t','n',0} |
| |
| static const WCHAR | tr_optW [] = {'/','t','r',0} |
| |
| static const WCHAR | xml_optW [] = {'/','x','m','l',0} |
| |
◆ COBJMACROS
◆ change_command()
Definition at line 136 of file schtasks.c.
137{
140 IRegisteredTask *task;
142
146 FIXME(
"Missing /tn value\n");
147 return 1;
148 }
149
150 if (task_name) {
151 FIXME(
"Duplicated /tn argument\n");
152 return 1;
153 }
154
165 FIXME(
"Missing /tr value\n");
166 return 1;
167 }
168
173 }else {
175 return 1;
176 }
177 }
178
179 if (!task_name) {
180 FIXME(
"Missing /tn option\n");
181 return 1;
182 }
183
184 if (!have_option) {
185 FIXME(
"Missing change options\n");
186 return 1;
187 }
188
190 if (!task)
191 return 1;
192
194 hres = IRegisteredTask_put_Enabled(task, VARIANT_TRUE);
196 IRegisteredTask_Release(task);
197 FIXME(
"put_Enabled failed: %08x\n",
hres);
198 return 1;
199 }
200 }
201
202 IRegisteredTask_Release(task);
203 return 0;
204}
static IRegisteredTask * get_registered_task(const WCHAR *name)
static const WCHAR tn_optW[]
static const WCHAR enable_optW[]
static const WCHAR tr_optW[]
Referenced by wmain().
◆ create_command()
Definition at line 206 of file schtasks.c.
207{
211 IRegisteredTask *task;
215
219 FIXME(
"Missing /xml value\n");
220 return 1;
221 }
222
223 if (xml_file) {
224 FIXME(
"Duplicated /xml argument\n");
225 return 1;
226 }
227
233 FIXME(
"Missing /tn value\n");
234 return 1;
235 }
236
237 if (task_name) {
238 FIXME(
"Duplicated /tn argument\n");
239 return 1;
240 }
241
251 FIXME(
"Missing /ru value\n");
252 return 1;
253 }
254
258 }else {
260 return 1;
261 }
262 }
263
264 if (!task_name) {
265 FIXME(
"Missing /tn argument\n");
266 return 1;
267 }
268
269 if (!xml_file) {
270 FIXME(
"Missing /xml argument\n");
272 }
273
275 if (!xml)
276 return 1;
277
281 return 1;
282 }
283
287 TASK_LOGON_NONE,
empty, &task);
290 ITaskFolder_Release(
root);
292 return 1;
293
294 IRegisteredTask_Release(task);
295 return 0;
296}
static const WCHAR empty[1]
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
static BSTR read_file_to_bstr(const WCHAR *file_name)
static ITaskFolder * get_tasks_root_folder(void)
static const WCHAR ru_optW[]
static const WCHAR xml_optW[]
static const WCHAR f_optW[]
Referenced by wmain().
◆ delete_command()
Definition at line 298 of file schtasks.c.
299{
304
307 TRACE(
"force opt\n");
312 FIXME(
"Missing /tn value\n");
313 return 1;
314 }
315
316 if (task_name) {
317 FIXME(
"Duplicated /tn argument\n");
318 return 1;
319 }
320
324 }else {
326 return 1;
327 }
328 }
329
330 if (!task_name) {
331 FIXME(
"Missing /tn argument\n");
332 return 1;
333 }
334
337 return 1;
338
342 ITaskFolder_Release(
root);
344 return 1;
345
346 return 0;
347}
Referenced by wmain().
◆ get_registered_task()
| static IRegisteredTask * get_registered_task |
( |
const WCHAR * |
name | ) |
|
|
static |
Definition at line 68 of file schtasks.c.
69{
70 IRegisteredTask *registered_task;
74
78
80 hres = ITaskFolder_GetTask(
root,
str, ®istered_task);
82 ITaskFolder_Release(
root);
86 }
87
88 return registered_task;
89}
Referenced by change_command().
◆ get_tasks_root_folder()
| static ITaskFolder * get_tasks_root_folder |
( |
void |
| ) |
|
|
static |
Definition at line 39 of file schtasks.c.
40{
41 ITaskService *service;
45
47 &IID_ITaskService, (void**)&service);
50
56 }
57
59 ITaskService_Release(service);
63 }
64
66}
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Referenced by create_command(), delete_command(), and get_registered_task().
◆ read_file_to_bstr()
Definition at line 91 of file schtasks.c.
92{
99
103 FIXME(
"Could not open file\n");
105 }
106
108 FIXME(
"Empty file\n");
111 }
112
118 FIXME(
"Read filed\n");
121 }
122
123 if (read_size > 2 &&
data[0] == 0xff &&
data[1] == 0xfe) {
125 }else {
130 }
132
134}
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
static unsigned int file_size
Referenced by create_command().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
| WINE_DEFAULT_DEBUG_CHANNEL |
( |
schtasks |
| ) |
|
◆ wmain()
Definition at line 349 of file schtasks.c.
350{
352
356
358
360 FIXME(
"Print current tasks state\n");
367 else
369
372}
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static int delete_command(int argc, WCHAR *argv[])
static int change_command(int argc, WCHAR *argv[])
static int create_command(int argc, WCHAR *argv[])
static const WCHAR delete_optW[]
static const WCHAR change_optW[]
static const WCHAR create_optW[]
◆ change_optW
◆ create_optW
◆ delete_optW
◆ enable_optW
◆ f_optW
◆ ru_optW
◆ tn_optW
◆ tr_optW
◆ xml_optW