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
5266f34c
Commit
5266f34c
authored
Nov 01, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Set the ComputerName property.
parent
936c14f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
package.c
dlls/msi/package.c
+14
-4
package.c
dlls/msi/tests/package.c
+5
-0
No files found.
dlls/msi/package.c
View file @
5266f34c
...
...
@@ -751,14 +751,13 @@ static VOID set_installer_properties(MSIPACKAGE *package)
static
const
WCHAR
szNetHoodFolder
[]
=
{
'N'
,
'e'
,
't'
,
'H'
,
'o'
,
'o'
,
'd'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szPrintHoodFolder
[]
=
{
'P'
,
'r'
,
'i'
,
'n'
,
't'
,
'H'
,
'o'
,
'o'
,
'd'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szRecentFolder
[]
=
{
'R'
,
'e'
,
'c'
,
'e'
,
'n'
,
't'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szComputerName
[]
=
{
'C'
,
'o'
,
'm'
,
'p'
,
'u'
,
't'
,
'e'
,
'r'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
/*
* Other things that probably should be set:
*
* ComputerName VirtualMemory
* ShellAdvSupport DefaultUIFont PackagecodeChanging
* CaptionHeight BorderTop BorderSide TextHeight
* RedirectedDllSupport
* VirtualMemory ShellAdvSupport DefaultUIFont PackagecodeChanging
* CaptionHeight BorderTop BorderSide TextHeight RedirectedDllSupport
*/
SHGetFolderPathW
(
NULL
,
CSIDL_COMMON_APPDATA
,
NULL
,
0
,
pth
);
...
...
@@ -1014,6 +1013,17 @@ static VOID set_installer_properties(MSIPACKAGE *package)
msi_free
(
username
);
}
}
len
=
0
;
if
(
!
GetComputerNameW
(
NULL
,
&
len
)
&&
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
)
{
WCHAR
*
computername
;
if
((
computername
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
)))
{
if
(
GetComputerNameW
(
computername
,
&
len
))
msi_set_property
(
package
->
db
,
szComputerName
,
computername
);
msi_free
(
computername
);
}
}
}
static
UINT
msi_load_summary_properties
(
MSIPACKAGE
*
package
)
...
...
dlls/msi/tests/package.c
View file @
5266f34c
...
...
@@ -10103,6 +10103,11 @@ static void test_installprops(void)
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
trace
(
"PackageCode = %s
\n
"
,
buf
);
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"ComputerName"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS got %d
\n
"
,
r
);
trace
(
"ComputerName = %s
\n
"
,
buf
);
langid
=
GetUserDefaultLangID
();
sprintf
(
path
,
"%d"
,
langid
);
...
...
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