Re: Windows 2003 system account starting process as new user

From: Pavel Lebedinsky (m_pll)
Date: 01/27/04

Date: Mon, 26 Jan 2004 18:39:35 -0800

I think this is actually a bug in W2K3. You can also reproduce it
by launching an instance of cmd.exe as System (using at /interactive)
and then trying to use runas from this cmd window.

Do you pass NULL as STARTUPINFO::lpDesktop? You could
probably pass a non-NULL value and manually set permissions
on the window station and desktop instead of letting CPWLW
do it for you (which is I think where it fails). I haven't tried it though
so I don't know if it will help or not.

"Jeffrey Hamblin" wrote:

> What happens when you try it on XP with a user who is not a member of the
> Administrators group?
> My first guess is that you are failing the access check against the
> WindowStation on Server. On XP, everyone is admin, so you are getting
> through. Let me know, and I'll do some checking over here as well.
> > I have a windows service running under the system account, this service
> calls an exe using CreateProcessWithLogonW to start it as a different user
> (in this can a user with admin rights). This works just fine on Windows
> Pro, but I get access is denied as the error message on Windows 2003
> Standard Edition. Please let me know if anybody knows any way to get this
> working.