When the shell is assigned to cmd.exe, open to the logged in user's profile path. This appears to match the behavior of Windows Server 2003 userinit. It is also a prerequisite for ReactOS Server Core.
Using `userenv!CreateEnvironmentBlock()` when starting the shell ensures
that, even if it's started as LocalSystem, its environment inherits the
"dynamical" environment variables created by SMSS at runtime (stored in
`HKLM\SYSTEM\CurrentControlSet\Session Manager\Environment`).
In ReactOS/Windows PE "MiniNT" mode, the Winlogon environment doesn't
contain these values, and doesn't start the Setup with this augmented
environment. (This is compatible with what Windows does, on WinPE or
during a clean installation.)
Winlogon creates an augmented environment only when a user logs in and
starts its shell (standard boot), which isn't the case in "MiniNT" mode.
It is thus the responsibility of the module that starts the shell instead
to do it: in ReactOS' case, userinit.exe in LiveCD mode.
As a result, we get access to the `COMPUTERNAME`, `NUMBER_OF_PROCESSORS`,
`OS`, and `PROCESSOR_*` environment variables, amongst others.
- Transform TryToStartShell() into a StartProcess() function whose aim
is just to start processes, since there is no extra initialization needed
for starting a shell process.
- Modify StartInstaller() to call StartProcess() for starting the ReactOS GUI
installer found on the installation media, from a path automatically expanded
depending on the ambient CPU architecture.
svn path=/branches/setup_improvements/; revision=75331