locked
Why isn't an elevated process (rmtool.exe) able to restart another elevated process using restartmanager API? RRS feed

Answers

  • Hi,

    I don't have access to this forum. Anyway, try rather a C++ or Windows API forum as this is a low level question about how a particular Windows API works (C# is still something else and uses most of the time higher level functions).

    My guess is that this is likely for safety reasons. The purpose of the Restart Manager seems to be to allow updating system files (you may have to restart some applications to do that but restarting an arbitrary elevated application seems to be out of scope and could likely be abused).

    This is a limitation of the API itself. From http://msdn.microsoft.com/en-us/library/windows/desktop/aa373665(v=vs.85).aspx :

    "The RmRestart function does not restart any applications that run with elevated privileges. Even if the application was shutdown by Restart Manager.

    The RmRestart function does not restart any applications that do not run as the currently-logged on user. Even if the application was shutdown by Restart Manager. For example, the RmRestart function does not restart applications started with the Run As command that do not run as the currently-logged on user. These applications must be manually restarted."

    I'm not sure what you are trying to do but in the appropriate forum, I would suggest to explain what you are trying to do rather than to ask about why you have a limitation in doing this the way you think it should be done... 


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".

    • Marked as answer by Harald Binkle Friday, January 4, 2013 2:16 PM
    Friday, January 4, 2013 1:28 PM