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
031c70c9
Commit
031c70c9
authored
Oct 22, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Register service arguments in the InstallServices action.
parent
7f5204e1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
action.c
dlls/msi/action.c
+19
-5
action.c
dlls/msi/tests/action.c
+1
-1
No files found.
dlls/msi/action.c
View file @
031c70c9
...
...
@@ -5369,9 +5369,8 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
SC_HANDLE
hscm
,
service
=
NULL
;
LPCWSTR
comp
,
key
;
LPWSTR
name
=
NULL
,
disp
=
NULL
,
load_order
=
NULL
,
serv_name
=
NULL
;
LPWSTR
depends
=
NULL
,
pass
=
NULL
;
DWORD
serv_type
,
start_type
;
DWORD
err_control
;
LPWSTR
depends
=
NULL
,
pass
=
NULL
,
args
=
NULL
,
image_path
=
NULL
;
DWORD
serv_type
,
start_type
,
err_control
;
SERVICE_DESCRIPTIONW
sd
=
{
NULL
};
static
const
WCHAR
query
[]
=
...
...
@@ -5400,6 +5399,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
deformat_string
(
package
,
MSI_RecordGetString
(
rec
,
8
),
&
depends
);
deformat_string
(
package
,
MSI_RecordGetString
(
rec
,
9
),
&
serv_name
);
deformat_string
(
package
,
MSI_RecordGetString
(
rec
,
10
),
&
pass
);
deformat_string
(
package
,
MSI_RecordGetString
(
rec
,
11
),
&
args
);
comp
=
MSI_RecordGetString
(
rec
,
12
);
deformat_string
(
package
,
MSI_RecordGetString
(
rec
,
13
),
&
sd
.
lpDescription
);
...
...
@@ -5420,9 +5420,21 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
goto
done
;
}
if
(
!
args
||
!
args
[
0
])
image_path
=
file
->
TargetPath
;
else
{
int
len
=
strlenW
(
file
->
TargetPath
)
+
strlenW
(
args
)
+
2
;
if
(
!
(
image_path
=
msi_alloc
(
len
*
sizeof
(
WCHAR
))))
return
ERROR_OUTOFMEMORY
;
strcpyW
(
image_path
,
file
->
TargetPath
);
strcatW
(
image_path
,
szSpace
);
strcatW
(
image_path
,
args
);
}
service
=
CreateServiceW
(
hscm
,
name
,
disp
,
GENERIC_ALL
,
serv_type
,
start_type
,
err_control
,
file
->
TargetPath
,
load_order
,
NULL
,
depends
,
serv_name
,
pass
);
start_type
,
err_control
,
image_path
,
load_order
,
NULL
,
depends
,
serv_name
,
pass
);
if
(
!
service
)
{
if
(
GetLastError
()
!=
ERROR_SERVICE_EXISTS
)
...
...
@@ -5434,6 +5446,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
WARN
(
"failed to set service description %u
\n
"
,
GetLastError
());
}
if
(
image_path
!=
file
->
TargetPath
)
msi_free
(
image_path
);
done:
CloseServiceHandle
(
service
);
CloseServiceHandle
(
hscm
);
...
...
@@ -5444,6 +5457,7 @@ done:
msi_free
(
serv_name
);
msi_free
(
pass
);
msi_free
(
depends
);
msi_free
(
args
);
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/tests/action.c
View file @
031c70c9
...
...
@@ -212,7 +212,7 @@ static const char service_install_dat[] =
"LoadOrderGroup
\t
Dependencies
\t
StartName
\t
Password
\t
Arguments
\t
Component_
\t
Description
\n
"
"s72
\t
s255
\t
L255
\t
i4
\t
i4
\t
i4
\t
S255
\t
S255
\t
S255
\t
S255
\t
S255
\t
s72
\t
L255
\n
"
"ServiceInstall
\t
ServiceInstall
\n
"
"TestService
\t
[SERVNAME]
\t
[SERVDISP]
\t
2
\t
3
\t
0
\t\t
\t
TestService
\t\t\t
service_comp
\t\t
"
;
"TestService
\t
[SERVNAME]
\t
[SERVDISP]
\t
2
\t
3
\t
0
\t\t
service1[~]+group1[~]service2[~]+group2[~][~]
\t
TestService
\t\t
-a arg
\t
service_comp
\t
description
"
;
static
const
char
service_control_dat
[]
=
"ServiceControl
\t
Name
\t
Event
\t
Arguments
\t
Wait
\t
Component_
\n
"
...
...
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