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
fd0efd92
Commit
fd0efd92
authored
Jan 28, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineboot: Set the USERNAME and USERPROFILE variables in the volatile environment.
parent
4e2827aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
wineboot.c
programs/wineboot/wineboot.c
+8
-1
No files found.
programs/wineboot/wineboot.c
View file @
fd0efd92
...
...
@@ -291,11 +291,13 @@ static void create_volatile_environment_registry_key(void)
static
const
WCHAR
LocalAppDataW
[]
=
{
'L'
,
'O'
,
'C'
,
'A'
,
'L'
,
'A'
,
'P'
,
'P'
,
'D'
,
'A'
,
'T'
,
'A'
,
0
};
static
const
WCHAR
LogonServerW
[]
=
{
'L'
,
'O'
,
'G'
,
'O'
,
'N'
,
'S'
,
'E'
,
'R'
,
'V'
,
'E'
,
'R'
,
0
};
static
const
WCHAR
SessionNameW
[]
=
{
'S'
,
'E'
,
'S'
,
'S'
,
'I'
,
'O'
,
'N'
,
'N'
,
'A'
,
'M'
,
'E'
,
0
};
static
const
WCHAR
UserNameW
[]
=
{
'U'
,
'S'
,
'E'
,
'R'
,
'N'
,
'A'
,
'M'
,
'E'
,
0
};
static
const
WCHAR
UserProfileW
[]
=
{
'U'
,
'S'
,
'E'
,
'R'
,
'P'
,
'R'
,
'O'
,
'F'
,
'I'
,
'L'
,
'E'
,
0
};
static
const
WCHAR
ConsoleW
[]
=
{
'C'
,
'o'
,
'n'
,
's'
,
'o'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
EmptyW
[]
=
{
0
};
WCHAR
path
[
MAX_PATH
];
WCHAR
computername
[
MAX_COMPUTERNAME_LENGTH
+
1
+
2
];
DWORD
size
=
MAX_COMPUTERNAME_LENGTH
+
1
;
DWORD
size
;
HKEY
hkey
;
HRESULT
hr
;
...
...
@@ -313,17 +315,22 @@ static void create_volatile_environment_registry_key(void)
hr
=
SHGetFolderPathW
(
NULL
,
CSIDL_PROFILE
,
NULL
,
SHGFP_TYPE_CURRENT
,
path
);
if
(
SUCCEEDED
(
hr
))
{
set_reg_value
(
hkey
,
UserProfileW
,
path
);
set_reg_value
(
hkey
,
HomePathW
,
path
+
2
);
path
[
2
]
=
'\0'
;
set_reg_value
(
hkey
,
HomeDriveW
,
path
);
}
size
=
sizeof
(
path
);
if
(
GetUserNameW
(
path
,
&
size
))
set_reg_value
(
hkey
,
UserNameW
,
path
);
set_reg_value
(
hkey
,
HomeShareW
,
EmptyW
);
hr
=
SHGetFolderPathW
(
NULL
,
CSIDL_LOCAL_APPDATA
,
NULL
,
SHGFP_TYPE_CURRENT
,
path
);
if
(
SUCCEEDED
(
hr
))
set_reg_value
(
hkey
,
LocalAppDataW
,
path
);
size
=
sizeof
(
computername
)
-
2
;
if
(
GetComputerNameW
(
&
computername
[
2
],
&
size
))
{
computername
[
0
]
=
computername
[
1
]
=
'\\'
;
...
...
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