Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a6a5bca5
Commit
a6a5bca5
authored
Jan 22, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schtasks: Added support for /f argument in create command.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4415653f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
schtasks.c
programs/schtasks/schtasks.c
+6
-1
schtasks.c
programs/schtasks/tests/schtasks.c
+3
-0
No files found.
programs/schtasks/schtasks.c
View file @
a6a5bca5
...
@@ -183,6 +183,7 @@ static int create_command(int argc, WCHAR *argv[])
...
@@ -183,6 +183,7 @@ static int create_command(int argc, WCHAR *argv[])
{
{
const
WCHAR
*
task_name
=
NULL
,
*
xml_file
=
NULL
;
const
WCHAR
*
task_name
=
NULL
,
*
xml_file
=
NULL
;
ITaskFolder
*
root
=
NULL
;
ITaskFolder
*
root
=
NULL
;
LONG
flags
=
TASK_CREATE
;
IRegisteredTask
*
task
;
IRegisteredTask
*
task
;
VARIANT
empty
;
VARIANT
empty
;
BSTR
str
,
xml
;
BSTR
str
,
xml
;
...
@@ -217,6 +218,10 @@ static int create_command(int argc, WCHAR *argv[])
...
@@ -217,6 +218,10 @@ static int create_command(int argc, WCHAR *argv[])
task_name
=
argv
[
1
];
task_name
=
argv
[
1
];
argc
-=
2
;
argc
-=
2
;
argv
+=
2
;
argv
+=
2
;
}
else
if
(
!
strcmpiW
(
argv
[
0
],
f_optW
))
{
flags
=
TASK_CREATE_OR_UPDATE
;
argc
--
;
argv
++
;
}
else
{
}
else
{
FIXME
(
"Unsupported argument %s
\n
"
,
debugstr_w
(
argv
[
0
]));
FIXME
(
"Unsupported argument %s
\n
"
,
debugstr_w
(
argv
[
0
]));
return
1
;
return
1
;
...
@@ -245,7 +250,7 @@ static int create_command(int argc, WCHAR *argv[])
...
@@ -245,7 +250,7 @@ static int create_command(int argc, WCHAR *argv[])
V_VT
(
&
empty
)
=
VT_EMPTY
;
V_VT
(
&
empty
)
=
VT_EMPTY
;
str
=
SysAllocString
(
task_name
);
str
=
SysAllocString
(
task_name
);
hres
=
ITaskFolder_RegisterTask
(
root
,
str
,
xml
,
TASK_CREATE
,
empty
,
empty
,
hres
=
ITaskFolder_RegisterTask
(
root
,
str
,
xml
,
flags
,
empty
,
empty
,
TASK_LOGON_NONE
,
empty
,
&
task
);
TASK_LOGON_NONE
,
empty
,
&
task
);
SysFreeString
(
str
);
SysFreeString
(
str
);
SysFreeString
(
xml
);
SysFreeString
(
xml
);
...
...
programs/schtasks/tests/schtasks.c
View file @
a6a5bca5
...
@@ -211,6 +211,9 @@ START_TEST(schtasks)
...
@@ -211,6 +211,9 @@ START_TEST(schtasks)
r
=
run_command
(
"schtasks /change /tn wine
\\
winetest /enable"
);
r
=
run_command
(
"schtasks /change /tn wine
\\
winetest /enable"
);
ok
(
r
==
0
,
"r = %u
\n
"
,
r
);
ok
(
r
==
0
,
"r = %u
\n
"
,
r
);
r
=
run_command
(
"schtasks /create /xml test.xml /f /tn wine
\\
winetest"
);
ok
(
r
==
0
,
"r = %u
\n
"
,
r
);
/* task already exists, but /f argument provided */
r
=
run_command
(
"schtasks /create /xml test.xml /tn wine
\\
winetest"
);
r
=
run_command
(
"schtasks /create /xml test.xml /tn wine
\\
winetest"
);
ok
(
r
==
1
,
"r = %u
\n
"
,
r
);
/* task already exists */
ok
(
r
==
1
,
"r = %u
\n
"
,
r
);
/* task already exists */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment