|I have been using CreateProcessAsUser for creating processes (e.g. notepad,
| etc)
[quoted text clipped - 7 lines]
| Regards,
| Ashish
Hi Kevin,
Here is the sample program that I want to run on Vista
#define UNICODE
#define _WIN32_WINNT 0x0500
#include <userenv.h>
#include <windows.h>
void wmain(int argc, WCHAR *argv[])
{
DWORD dwFlags=0;
PROCESS_INFORMATION pi={0};
STARTUPINFOW si={0};
SecureZeroMemory(&si, sizeof(STARTUPINFO));
si.cb = sizeof(STARTUPINFO);
dwFlags = CREATE_UNICODE_ENVIRONMENT;
if(!CreateProcessWithLogonW(L"administrator", L"UJMO6506-2KS-5",
L"Test0000", LOGON_WITH_PROFILE, NULL, argv[1], dwFlags, NULL, NULL, &si,
&pi))
printf("\nExecuted CreateProcess with error code=[%d]", GetLastError());
else
printf("The pid of the process=[0x%x]", pi.dwProcessId);
}
/* The argv[1] denotes the application we want to create, eg: notepad, calc,
mspaint, explorer, etc) */
Please suggest how should I avoid the UAC popup when the application kicks
off using this API. Disabling the UAC at the OS level is not an option for me.
Regards,
Ashish
> Could you show us the actual code you are using? It would be helpful if I
> could try it on my end first, and then maybe I could offer up some
[quoted text clipped - 14 lines]
> | Regards,
> | Ashish
mayayana - 08 May 2008 13:35 GMT
Did you notice the name of this newsgroup?
"vb.winapi" Did you realize that you're working
with C++?
> Here is the sample program that I want to run on Vista
>
[quoted text clipped - 46 lines]
> > | Regards,
> > | Ashish
Ashish - 09 May 2008 10:02 GMT
> Did you notice the name of this newsgroup?
> "vb.winapi" Did you realize that you're working
[quoted text clipped - 58 lines]
>
> - Show quoted text -
I saw a few discussion on the API I am talking about. (http://
groups.google.com/group/microsoft.public.vb.winapi/browse_thread/
thread/8da1762c4978a89e#)
So thought of putting it. You are sounding as if I did a crime, and
that too against you!
expvb - 08 May 2008 13:45 GMT