Xavier Roche
2012-01-26 08:52:16 UTC
Hi folks,
I have a service running as a non-privileged user (a local system
.\user), and I am using CreateProcessW() to install some MSI executable
package in "unattended" mode (setup.exe /q), using the local
Administrator credentials.
When executing the executables, the return code (GetExitCodeProcess())
is -1073741502 (c0000142, "DLL Initialization Failed"). The failing DLL
name is unfortunately not given :)
However, KB 165194 (http://support.microsoft.com/kb/165194) suggests
that CreateProcessAsUser() might fail with a "Initialization of the
dynamic library <system>\system32\user32.dll failed" error because of
restricted access to the desktop.
Rather than attempting to access the interactive desktop session and
request necessary rights (as suggested in KB), is there a clean way to
create a "dummy" desktop session with proper rights ? Would this be
sufficient to solve the issue ? [Note: using the interactive session is
hopeless in this case, because there is no user interacting at all]
Thanks in advance for any hints :)
I have a service running as a non-privileged user (a local system
.\user), and I am using CreateProcessW() to install some MSI executable
package in "unattended" mode (setup.exe /q), using the local
Administrator credentials.
When executing the executables, the return code (GetExitCodeProcess())
is -1073741502 (c0000142, "DLL Initialization Failed"). The failing DLL
name is unfortunately not given :)
However, KB 165194 (http://support.microsoft.com/kb/165194) suggests
that CreateProcessAsUser() might fail with a "Initialization of the
dynamic library <system>\system32\user32.dll failed" error because of
restricted access to the desktop.
Rather than attempting to access the interactive desktop session and
request necessary rights (as suggested in KB), is there a clean way to
create a "dummy" desktop session with proper rights ? Would this be
sufficient to solve the issue ? [Note: using the interactive session is
hopeless in this case, because there is no user interacting at all]
Thanks in advance for any hints :)