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
101d72f8
Commit
101d72f8
authored
Dec 25, 2009
by
Andrew Nguyen
Committed by
Alexandre Julliard
Dec 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineboot: Generate the HKCU\Volatile Environment registry key.
parent
8b73b131
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
2 deletions
+55
-2
wineboot.c
programs/wineboot/wineboot.c
+55
-0
wine.inf.in
tools/wine.inf.in
+0
-2
No files found.
programs/wineboot/wineboot.c
View file @
101d72f8
...
...
@@ -277,6 +277,59 @@ static void create_environment_registry_keys( void )
RegCloseKey
(
env_key
);
}
static
void
create_volatile_environment_registry_key
(
void
)
{
static
const
WCHAR
VolatileEnvW
[]
=
{
'V'
,
'o'
,
'l'
,
'a'
,
't'
,
'i'
,
'l'
,
'e'
,
' '
,
'E'
,
'n'
,
'v'
,
'i'
,
'r'
,
'o'
,
'n'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
AppDataW
[]
=
{
'A'
,
'P'
,
'P'
,
'D'
,
'A'
,
'T'
,
'A'
,
0
};
static
const
WCHAR
ClientNameW
[]
=
{
'C'
,
'L'
,
'I'
,
'E'
,
'N'
,
'T'
,
'N'
,
'A'
,
'M'
,
'E'
,
0
};
static
const
WCHAR
HomeDriveW
[]
=
{
'H'
,
'O'
,
'M'
,
'E'
,
'D'
,
'R'
,
'I'
,
'V'
,
'E'
,
0
};
static
const
WCHAR
HomePathW
[]
=
{
'H'
,
'O'
,
'M'
,
'E'
,
'P'
,
'A'
,
'T'
,
'H'
,
0
};
static
const
WCHAR
HomeShareW
[]
=
{
'H'
,
'O'
,
'M'
,
'E'
,
'S'
,
'H'
,
'A'
,
'R'
,
'E'
,
0
};
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
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
;
HKEY
hkey
;
HRESULT
hr
;
if
(
RegCreateKeyExW
(
HKEY_CURRENT_USER
,
VolatileEnvW
,
0
,
NULL
,
REG_OPTION_VOLATILE
,
KEY_ALL_ACCESS
,
NULL
,
&
hkey
,
NULL
))
return
;
hr
=
SHGetFolderPathW
(
NULL
,
CSIDL_APPDATA
,
NULL
,
SHGFP_TYPE_CURRENT
,
path
);
if
(
SUCCEEDED
(
hr
))
RegSetValueExW
(
hkey
,
AppDataW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
path
,
(
strlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
)
);
RegSetValueExW
(
hkey
,
ClientNameW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
ConsoleW
,
sizeof
(
ConsoleW
)
);
/* Write the profile path's drive letter and directory components into
* HOMEDRIVE and HOMEPATH respectively. */
hr
=
SHGetFolderPathW
(
NULL
,
CSIDL_PROFILE
,
NULL
,
SHGFP_TYPE_CURRENT
,
path
);
if
(
SUCCEEDED
(
hr
))
{
RegSetValueExW
(
hkey
,
HomePathW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
&
path
[
2
],
(
strlenW
(
path
)
+
1
-
2
)
*
sizeof
(
WCHAR
)
);
path
[
2
]
=
'\0'
;
RegSetValueExW
(
hkey
,
HomeDriveW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
path
,
3
*
sizeof
(
WCHAR
)
);
}
RegSetValueExW
(
hkey
,
HomeShareW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
EmptyW
,
sizeof
(
EmptyW
)
);
hr
=
SHGetFolderPathW
(
NULL
,
CSIDL_LOCAL_APPDATA
,
NULL
,
SHGFP_TYPE_CURRENT
,
path
);
if
(
SUCCEEDED
(
hr
))
RegSetValueExW
(
hkey
,
LocalAppDataW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
path
,
(
strlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
GetComputerNameW
(
&
computername
[
2
],
&
size
))
RegSetValueExW
(
hkey
,
LogonServerW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
computername
,
(
size
+
1
+
2
)
*
sizeof
(
WCHAR
)
);
RegSetValueExW
(
hkey
,
SessionNameW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
ConsoleW
,
sizeof
(
ConsoleW
)
);
RegCloseKey
(
hkey
);
}
/* Performs the rename operations dictated in %SystemRoot%\Wininit.ini.
* Returns FALSE if there was an error, or otherwise if all is ok.
*/
...
...
@@ -999,6 +1052,8 @@ int main( int argc, char *argv[] )
}
if
(
init
||
update
)
update_wineprefix
(
update
);
create_volatile_environment_registry_key
();
ProcessRunKeys
(
HKEY_LOCAL_MACHINE
,
runkeys_names
[
RUNKEY_RUNONCE
],
TRUE
,
TRUE
);
if
(
!
init
&&
!
restart
)
...
...
tools/wine.inf.in
View file @
101d72f8
...
...
@@ -453,9 +453,7 @@ HKLM,Software\Microsoft\DirectPlay\Service Providers\Serial Connection For Direc
HKLM,Software\Microsoft\DirectPlay\Service Providers\Serial Connection For DirectPlay,"Path",,"dpmodemx.dll"
[Environment]
HKLM,System\CurrentControlSet\Control\Session Manager\Environment,"APPDATA",,"%16410%"
HKLM,System\CurrentControlSet\Control\Session Manager\Environment,"ComSpec",0x00020000,"%11%\cmd.exe"
HKLM,System\CurrentControlSet\Control\Session Manager\Environment,"LOCALAPPDATA",,"%16412%"
HKLM,System\CurrentControlSet\Control\Session Manager\Environment,"PATH",0x00020002,"%11%;%10%;%11%\wbem"
HKLM,System\CurrentControlSet\Control\Session Manager\Environment,"ProgramFiles",,"%16422%"
HKLM,System\CurrentControlSet\Control\Session Manager\Environment,"SystemDrive",2,"c:"
...
...
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