locked
CreateProcess() return FALSE under Win64 RRS feed

  • Question

  • Hi All,

    using CreateProcess() to run .exe under win64 return false.
    While msdn says i can run proces using this function.
    Could anyone help, whre the problem with CreateProcess might be ?

    Monday, November 29, 2010 9:38 PM

Answers

  • It means the process you are starting requires administrator privileges. 
    • Marked as answer by hoff nof Monday, November 29, 2010 10:42 PM
    Monday, November 29, 2010 10:32 PM

All replies

  • The obvious next step is to examine the value of GetLastError().
    Monday, November 29, 2010 9:50 PM
  • Hi,

    What OS you are using? Please try ShellExecute or ShellExecuteEx

     

    RenJie

    Monday, November 29, 2010 9:58 PM
  • cant debug there, just see that run process returns false;
    while exe path is correct. it works under win32, under win64 create process fails.

    Monday, November 29, 2010 10:10 PM
  • run under win7x64bit; process which calls CreateProcess is compiled for 64 bit windows.

    under win32 its fine.

    Monday, November 29, 2010 10:12 PM
  • ok i get it - the last error;
    Cretate process retun false with this:

    ERROR_ELEVATION_REQUIRED
    740

    The requested operation requires elevation.

    what does it mean ?
    Monday, November 29, 2010 10:20 PM
  • Hi,

    I have told you, try to use ShellExecute or ShellExecuteEx.

    RenJie

    Monday, November 29, 2010 10:30 PM
  • It means the process you are starting requires administrator privileges. 
    • Marked as answer by hoff nof Monday, November 29, 2010 10:42 PM
    Monday, November 29, 2010 10:32 PM
  • yes, it works now, i just restart to aply the admin right.
    also if run create porocess and it return false with lasterror 740, then try to start with ShellExecute, which produces elevation dialog, and its done.
    other way is to grant user with admin right, if possible.

    Monday, November 29, 2010 10:42 PM
  • Just call ShellExecute.  Simpler.
    Monday, November 29, 2010 11:52 PM