Hi ,
I am trying to create process using CreateProcessWithLogonW() API.
This works fine on Win2000 and NT, but in Vista it gives a UAC popup
before the process (say, notepad, calc, etc) kicks off.
This is the sample program that I am compiling on .NET
/* START OF PROGRAM */
#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);
}
/* argv[1] is the tool that I want to run (eg: notepad) */
/* END OF PROGRAM */
Could someone please suggest me how to use this API so that I do not
get the vista UAC popup?
Disabling the UAC on the OS is not an option for me.
Many thanks in advance,
Ashish 1 4515
On Thu, 08 May 2008 01:29:32 -0700, <as*******@gmail.comwrote:
I am trying to create process using CreateProcessWithLogonW() API.
This works fine on Win2000 and NT, but in Vista it gives a UAC popup
before the process (say, notepad, calc, etc) kicks off.
What does this have to do with C#?
I don't think you can do what you want, but given that there's nothing
about the code you posted that suggests C# or .NET, this is really the
wrong newsgroup to ask.
Pete This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Arne |
last post by:
Hi,
I'm working on an asp.net application that reads a users username and
password, and starts a process with the username read.
The problem is that the program returns value...
|
by: jerry |
last post by:
I'm trying to run an application under another user within a winform
app writen in C#. I have tried a number of different things, but it
seems that the CreateProcessWithLogonW function should work...
|
by: Bilal Dinc |
last post by:
Hey, I have a question concerning the CreateProcessWithLogonW function
imported from the advapi32 dll. For some reason I cant get the appName
and cmdLine paramters to work together. For example,...
|
by: yk63fd01 |
last post by:
hi,
Is there a way to popup the balloon notifications from the systray
which are so common in xp (e.g., windows messenger, usb device plug in,
microsoft antispyware, etc)? I have found several...
|
by: Bucky Pollard |
last post by:
I have a web service that needs to create a batch file and call it (since
there are no APIs for the functionality I am looking for). I am using the
Process and ProcessStartInfo objects. When I try...
|
by: David Davidson |
last post by:
I am attempting to use CreateProcessWithLogonW from the server-side code of a
web page (yes, I want to create a process on the server) and not having much
luck.
I am attempting to run VPScan, an...
|
by: Matthew Wieder |
last post by:
I have an ASPNET app that is running as the ASPNET machine user. It
makes a call to the API CreateProcessWithLogonW. On Windows XP it
executes without a problem, but on Windows 2000, I get an...
|
by: Benjamin Bittner |
last post by:
Hallo NG,
I have problems with calling the CreateProcessWithLogonW() function. I tried
converting an VB6 example
(http://support.microsoft.com/default.aspx?scid=kb;en-us;285879) and some
snippets...
|
by: None |
last post by:
What's the difference between StartInteractiveClientProcess in
http://msdn.microsoft.com/en-us/library/aa379608(VS.85).aspx, and
CreateProcessWithLogonW?...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |