Error 740 - CreateProcess

I have to launch an application (which requires admin right to launch) from a normal process by createProcess but my createProcess returns error code 740. I do not mind getting UAC dialog but I need to launch the process and wait on the process handle untill the process is done. Any code snippet would be helpful.
Nothing to do with Windows security. I suggest you post your question in the appropriate programming forum.

3 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I have to launch an application (which requires admin right to launch) from a normal process by createProcess but my createProcess returns error code 740. I do not mind getting UAC dialog but I need to launch the process and wait on the process handle untill the process is done. Any code snippet would be helpful.

Hi Zakirh – Welcome to Microsoft Answers Community.

What programming language?
C/C++ or C# or VB, or what language is it?
Are you trying to Invoke API from Windows® to create a process?
Please provide more details, and I might be able to provide some
source code to work around this issue.

I hope you find this information useful. If you need any further assistance,
please feel free to contact me and let me know.

I hope this information was helpful…

Have a nice day…

Best regards,
Fisnik


Itknowledge24.com - Follow me on Twitter: http://twitter.com/itknowledge24
- UAC Trust Shortcut 2.0 is on its way. ITknowledge24 – A Resource for IT Professionals.

4 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

the error means this:

//
// MessageId: ERROR_ELEVATION_REQUIRED
//
// MessageText:
//
// The requested operation requires elevation.
//
#define ERROR_ELEVATION_REQUIRED         740 L


You get this error when you try to start an application with CreateProcess which requires admin rights. You have to useShellExecute with "runas" to start an application with admin rights.

André


"A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/

9 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I have to launch an application (which requires admin right to launch) from a normal process by createProcess but my createProcess returns error code 740. I do not mind getting UAC dialog but I need to launch the process and wait on the process handle untill the process is done. Any code snippet would be helpful.

May I know the programming language?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I have to launch an application (which requires admin right to launch) from a normal process by createProcess but my createProcess returns error code 740. I do not mind getting UAC dialog but I need to launch the process and wait on the process handle untill the process is done. Any code snippet would be helpful.

May I know the programming language?

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

This has nothing to do with the language.

"A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

This has nothing to do with the language.

"A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/

I was requesting the language so that I could provide the correct
code directly in C++ or C# or VB. Do you understand why I was asking?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

ShellExecute is not so complicated. He should get the code working by himself.
"A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

ShellExecute is not so complicated. He should get the code working by himself.
"A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/

I know it is easy if you're using the ProcessStartInfo class in .NET,
just set the UseShellExecute = true; it's a boolean value holder.
Provide the verb = "runas"; and you are done. It is very easy
to do this, I agree, I've been playing with it since Windows Vista.
Anyway, the OP shall also be able to use app.manifest configuration XML
to set the application to by default start in elevated mode.

Only have to modify the one XML line so that it looks like below:

<requestedExecutionLevellevel="requireAdministrator"uiAccess="false" />

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Elevated permissions are required to execute” message while issuing commands through Windows 8 Command Prompt? Probably you are not using the Elevated Command Prompt in Windows 8. 

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated April 13, 2024 Views 20,735 Applies to: