Prev Previous Post   Next Post Next

Starting administrator progs from a service using Windows VISTA

Posted: 11-10-2006, 04:44 PM
Hi,
I have a problem in launching an application through my service. I am
trying to launch e. g. update.exe through my service. The update.exe has a
UI. The UI should displayed on the current desktop. But the update.exe has to
run
with admin rights. Therefore a UserAccount exits.

I´m trying this stuff with using the "CreateProcessAsUser" API function.

Here my code (pieces):
if (LogonUser(szUserName, _T("."), szPwd, LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_DEFAULT, &hUser) == FALSE)
{ //error
}
else
{
if (CreateProcessAsUser(hUser, NULL, szComLine, NULL, NULL, FALSE,
CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi) == 0)
{ //error

}
}

CreateProcessAsUser failed. GetLastError is 740. And the error msgbox is
displayed in session0 (Service session on VISTA!).

What make I wrong?

Maybe there is another possibility to start my update.exe. Without using a
admin account. Perhaps I can impersonate the current launching process
(update.exe) from User Rights to admin rights. Is there a possibility?

Many thanks for your answer.




Reply With Quote

Responses to "Starting administrator progs from a service using Windows VISTA"

 
LinkBack Thread Tools Display Modes
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may 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 On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
local administrator in Windows Vista Sachin Jindal Windows Vista Administration 6 08-03-2006 03:29 AM
Print Spooler Service not automatically starting Rick Windows XP Printers / Scanners / Fax 0 10-27-2003 09:12 PM
starting service, minlogon/command shell system Roger Levy Windows XP Embedded 1 10-05-2003 08:34 PM
Error starting IPSEC service Steve Windows XP Work Remotely 0 10-04-2003 12:24 PM
Workstation Service not starting? Steve Lefevre Windows XP Setup 0 08-03-2003 08:31 PM