PC Review


Reply
Thread Tools Rate Thread

CreateProcessWithLogonW access denied

 
 
cranedear@gmail.com
Guest
Posts: n/a
 
      26th Apr 2007
I have an app that runs as the windows shell under an autologged on
limited user. This app calls CreateProcessWithLogonW to start an
application under an administrator account. There is a timing issue
where the CreateProcessWithLogonW function returns "access denied"
unless I wait a given amount of time before I try to start the
process. The times needed are different on different machines and
different versions of Windows (2000 / XP). Sometimes it is 20 seconds
others it is 180 seconds.

My hypothesis is that since my app is the shell and it starts at boot
time, Windows has not fully finished initializing and/or the
administrator account is not ready when my app tries to start the
other process under the other account (registry hive).

Does anyone have any clue what the problem is and if so any
solutions? Any suggestions of other places or groups to submit my
question?

Thanks for any help.

 
Reply With Quote
 
 
 
 
Newbie Coder
Guest
Posts: n/a
 
      27th Apr 2007
CraneDear,

If you look at the MSDN documentation for this function you will see that
you need to load the users profile into HKEY_USERS before calling the
CreateProcessWithLogonW function. If not, it will fail

It also says in XP to use CreateProcessAsUser & LogonUser, but one thing
with this is that if you call LogonUser under Windows 2000 it will fail
because you need to specify ACT AS PART OF THE OPERATING SYSTEM in the
policy settings, which will remove security & not something you want to do.
Also, remember that XP uses plain text passwords so if you don't want
someone to retrieve the password then you will need to ZeroMemory the very
second you can.

http://msdn2.microsoft.com/en-us/library/ms682431.aspx
http://support.microsoft.com/kb/818858

VB 6 Code (easily converted):

http://support.microsoft.com/kb/285879

All related docs:

http://search.microsoft.com/results....cessWithLogonW

--
Newbie Coder
(It's just a name)


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have an app that runs as the windows shell under an autologged on
> limited user. This app calls CreateProcessWithLogonW to start an
> application under an administrator account. There is a timing issue
> where the CreateProcessWithLogonW function returns "access denied"
> unless I wait a given amount of time before I try to start the
> process. The times needed are different on different machines and
> different versions of Windows (2000 / XP). Sometimes it is 20 seconds
> others it is 180 seconds.
>
> My hypothesis is that since my app is the shell and it starts at boot
> time, Windows has not fully finished initializing and/or the
> administrator account is not ready when my app tries to start the
> other process under the other account (registry hive).
>
> Does anyone have any clue what the problem is and if so any
> solutions? Any suggestions of other places or groups to submit my
> question?
>
> Thanks for any help.
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Denied, Access Denied- like a broken record! Sam Windows Vista General Discussion 6 3rd Mar 2008 02:11 AM
ftp access denied and administrator access to local policy denied =?Utf-8?B?SW50ZXJuZXQgRXhwbG9yZXIgVXNlciBHZXRzIFJ1 Microsoft Windows 2000 0 6th Jul 2007 02:16 PM
CreateProcessWithLogonW access denied cranedear@gmail.com Microsoft Windows 2000 1 27th Apr 2007 01:00 PM
CreateProcessWithLogonW access denied cranedear@gmail.com Windows XP General 1 27th Apr 2007 01:00 PM
You were denied access because: Access denied by access control list. William T Bonzo Windows XP Internet Explorer 4 3rd Feb 2006 10:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:45 AM.