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
854bfc4b
Commit
854bfc4b
authored
Jun 24, 2005
by
Aric Stewart
Committed by
Alexandre Julliard
Jun 24, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rework SelfRegModules to use MSI_IterateRecords.
parent
63e9a42b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
57 deletions
+42
-57
action.c
dlls/msi/action.c
+42
-57
No files found.
dlls/msi/action.c
View file @
854bfc4b
...
...
@@ -3270,15 +3270,13 @@ static UINT ACTION_WriteIniValues(MSIPACKAGE *package)
return
rc
;
}
static
UINT
ACTION_SelfRegModules
(
MSIPACKAGE
*
package
)
static
UINT
ITERATE_SelfRegModules
(
MSIRECORD
*
row
,
LPVOID
param
)
{
UINT
rc
;
MSIQUERY
*
view
;
MSIRECORD
*
row
=
0
;
static
const
WCHAR
ExecSeqQuery
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'S'
,
'e'
,
'l'
,
'f'
,
'R'
,
'e'
,
'g'
,
'`'
,
0
};
MSIPACKAGE
*
package
=
(
MSIPACKAGE
*
)
param
;
LPCWSTR
filename
;
LPWSTR
FullName
;
INT
index
;
DWORD
len
;
static
const
WCHAR
ExeStr
[]
=
{
'r'
,
'e'
,
'g'
,
's'
,
'v'
,
'r'
,
'3'
,
'2'
,
'.'
,
'e'
,
'x'
,
'e'
,
' '
,
'\"'
,
0
};
static
const
WCHAR
close
[]
=
{
'\"'
,
0
};
...
...
@@ -3288,67 +3286,54 @@ static UINT ACTION_SelfRegModules(MSIPACKAGE *package)
memset
(
&
si
,
0
,
sizeof
(
STARTUPINFOW
));
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
ExecSeqQuery
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
{
TRACE
(
"no SelfReg table
\n
"
);
return
ERROR_SUCCESS
;
}
filename
=
MSI_RecordGetString
(
row
,
1
);
index
=
get_loaded_file
(
package
,
filename
);
rc
=
MSI_ViewExecute
(
view
,
0
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
index
<
0
)
{
MSI_ViewClose
(
view
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
ERR
(
"Unable to find file id %s
\n
"
,
debugstr_w
(
filename
));
return
ERROR_SUCCESS
;
}
while
(
1
)
{
LPCWSTR
filename
;
LPWSTR
FullName
;
INT
index
;
DWORD
len
;
rc
=
MSI_ViewFetch
(
view
,
&
row
);
if
(
rc
!=
ERROR_SUCCESS
)
{
rc
=
ERROR_SUCCESS
;
break
;
}
len
=
strlenW
(
ExeStr
);
len
+=
strlenW
(
package
->
files
[
index
].
TargetPath
);
len
+=
2
;
filename
=
MSI_RecordGetString
(
row
,
1
);
index
=
get_loaded_file
(
package
,
filename
);
FullName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
strcpyW
(
FullName
,
ExeStr
);
strcatW
(
FullName
,
package
->
files
[
index
].
TargetPath
);
strcatW
(
FullName
,
close
);
if
(
index
<
0
)
{
ERR
(
"Unable to find file id %s
\n
"
,
debugstr_w
(
filename
));
msiobj_release
(
&
row
->
hdr
);
continue
;
}
TRACE
(
"Registering %s
\n
"
,
debugstr_w
(
FullName
));
brc
=
CreateProcessW
(
NULL
,
FullName
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
c_colon
,
&
si
,
&
info
);
len
=
strlenW
(
ExeStr
);
len
+=
strlenW
(
package
->
files
[
index
].
TargetPath
);
len
+=
2
;
if
(
brc
)
msi_dialog_check_messages
(
info
.
hProcess
);
FullName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
strcpyW
(
FullName
,
ExeStr
);
strcatW
(
FullName
,
package
->
files
[
index
].
TargetPath
);
strcatW
(
FullName
,
close
);
HeapFree
(
GetProcessHeap
(),
0
,
FullName
);
return
ERROR_SUCCESS
;
}
TRACE
(
"Registering %s
\n
"
,
debugstr_w
(
FullName
));
brc
=
CreateProcessW
(
NULL
,
FullName
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
c_colon
,
&
si
,
&
info
);
static
UINT
ACTION_SelfRegModules
(
MSIPACKAGE
*
package
)
{
UINT
rc
;
MSIQUERY
*
view
;
static
const
WCHAR
ExecSeqQuery
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'S'
,
'e'
,
'l'
,
'f'
,
'R'
,
'e'
,
'g'
,
'`'
,
0
};
if
(
brc
)
msi_dialog_check_messages
(
info
.
hProcess
);
HeapFree
(
GetProcessHeap
(),
0
,
FullName
);
msiobj_release
(
&
row
->
hdr
)
;
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
ExecSeqQuery
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
{
TRACE
(
"no SelfReg table
\n
"
);
return
ERROR_SUCCESS
;
}
MSI_ViewClose
(
view
);
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_SelfRegModules
,
package
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
return
ERROR_SUCCESS
;
}
static
UINT
ACTION_PublishFeatures
(
MSIPACKAGE
*
package
)
...
...
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