msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Programmically Call Run-As Dialog

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB WinAPI
Author Message
David Youngblood



Joined: 04 Oct 2007
Posts: 189

PostPosted: Sun Jan 13, 2008 12:24 am    Post subject: Programmically Call Run-As Dialog Reply with quote

Does anyone know if it is possible to call the Run-As dialog, and return a Token
handle that can be used by ImpersonateLoggedOnUser? I would like to be able to
allow my program to change users while running, without forcing a restart of the
program. LogonUser and CreateProcessWithLogonW do not do what I'm looking for,
as they require the users password. I do not want to ask the user to enter their
password into my program.

David

Archived from group: microsoft>public>vb>winapi
Back to top
View user's profile Send private message
Mark Yudkin



Joined: 04 Oct 2007
Posts: 198

PostPosted: Sun Jan 13, 2008 2:24 pm    Post subject: Re: Programmically Call Run-As Dialog Reply with quote

Your best bet is to use CredUIPromptForCredentials. Look up the Credentials
API in MSDN, it's too messy to describe here.

"David Youngblood" wrote in message $bb1KYVIHA.5132@TK2MSFTNGP02.phx.gbl...
> Does anyone know if it is possible to call the Run-As dialog, and return a
> Token
> handle that can be used by ImpersonateLoggedOnUser? I would like to be
> able to
> allow my program to change users while running, without forcing a restart
> of the
> program. LogonUser and CreateProcessWithLogonW do not do what I'm looking
> for,
> as they require the users password. I do not want to ask the user to enter
> their
> password into my program.
>
> David
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
implementing windows updates programmically I am a programmer. I got this new task. To update 200 PCs with the latest updates from MS for the windows and Office. I have study the update site that IE provides. I notice that besides selecting and combo downloading the updates, you can individually

*weird* overflow error *after* API call; call works OK, but I have a VB application that makes a API call, returns OK, but which then fails to do simple VBA-related actions: Private Function As As Long Dim qqq As Double qqq = 2 qqq = qqq / 2 DoGetEntity = SendMessage(

how to call API in VB.NET hi all, how can I call win api in vb.net. It the syntax is different then vb6. Any short example or link to atritcle? Thanks in advance Ansari

Is there an API call instead of AD? Hello all, I want to find out if a user account is disabled or not. Currently I use AD (see code below), but I would prefer an API call, because then I don't have to reference the every time. Any ideas? Thanks in advance! Kind Regards,

Possible to add a button to an API dialog? Is there a way to add a button onto the dialog and tap into the dialog's events from the calling program? If not, can anybody point me to some VB code which simulates the dialog?
Post new topic   Reply to topic    msvisual.com Forum Index -> VB WinAPI All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group