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
0800f29b
Commit
0800f29b
authored
Feb 12, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msiexec: Convert DoRegServer to Unicode.
parent
6cd2ffae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
msiexec.c
programs/msiexec/msiexec.c
+13
-14
No files found.
programs/msiexec/msiexec.c
View file @
0800f29b
...
@@ -344,26 +344,25 @@ static DWORD DoDllUnregisterServer(LPCWSTR DllName)
...
@@ -344,26 +344,25 @@ static DWORD DoDllUnregisterServer(LPCWSTR DllName)
static
DWORD
DoRegServer
(
void
)
static
DWORD
DoRegServer
(
void
)
{
{
static
const
WCHAR
msiserverW
[]
=
{
'M'
,
'S'
,
'I'
,
'S'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
msiexecW
[]
=
{
'\\'
,
'm'
,
's'
,
'i'
,
'e'
,
'x'
,
'e'
,
'c'
,
' '
,
'/'
,
'V'
,
0
};
SC_HANDLE
scm
,
service
;
SC_HANDLE
scm
,
service
;
CHAR
path
[
MAX_PATH
+
12
];
W
CHAR
path
[
MAX_PATH
+
12
];
DWORD
ret
=
0
;
DWORD
len
,
ret
=
0
;
scm
=
OpenSCManagerA
(
NULL
,
SERVICES_ACTIVE_DATABASEA
,
SC_MANAGER_CREATE_SERVICE
);
if
(
!
(
scm
=
OpenSCManagerW
(
NULL
,
SERVICES_ACTIVE_DATABASEW
,
SC_MANAGER_CREATE_SERVICE
)))
if
(
!
scm
)
{
{
fprintf
(
stderr
,
"Failed to open the service control manager.
\n
"
);
fprintf
(
stderr
,
"Failed to open the service control manager.
\n
"
);
return
1
;
return
1
;
}
}
len
=
GetSystemDirectoryW
(
path
,
MAX_PATH
);
GetSystemDirectoryA
(
path
,
MAX_PATH
);
lstrcpyW
(
path
+
len
,
msiexecW
);
lstrcatA
(
path
,
"
\\
msiexec.exe /V"
);
if
((
service
=
CreateServiceW
(
scm
,
msiserverW
,
msiserverW
,
GENERIC_ALL
,
SERVICE_WIN32_SHARE_PROCESS
,
SERVICE_DEMAND_START
,
service
=
CreateServiceA
(
scm
,
"MSIServer"
,
"MSIServer"
,
GENERIC_ALL
,
SERVICE_ERROR_NORMAL
,
path
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
)))
SERVICE_WIN32_SHARE_PROCESS
,
SERVICE_DEMAND_START
,
{
SERVICE_ERROR_NORMAL
,
path
,
NULL
,
NULL
,
CloseServiceHandle
(
service
);
NULL
,
NULL
,
NULL
);
}
if
(
service
)
CloseServiceHandle
(
service
);
else
if
(
GetLastError
()
!=
ERROR_SERVICE_EXISTS
)
else
if
(
GetLastError
()
!=
ERROR_SERVICE_EXISTS
)
{
{
fprintf
(
stderr
,
"Failed to create MSI service
\n
"
);
fprintf
(
stderr
,
"Failed to create MSI service
\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