Author Topic: Windows / Run program elevated  (Read 3227 times)

Offline Bat

  • Multiple posting newcomer
  • *
  • Posts: 48
Windows / Run program elevated
« on: October 30, 2014, 09:37:12 pm »
Here is a patch for adding automatic elevated run possibility
https://sourceforge.net/p/codeblocks/tickets/75/

It's specific Windows code. It will run under all windows versions, but will not do anything before Windows Vista.
When a program is run (after compilation for exemple), if running failed with error code saying "this program must be run elevated", it try to run it elevated. This need to use ::ShellExecute with "runas" operation. I have not found this possibility in wx. So patch is a bit "crude" (Win32 code + Win32 Thread for waiting program end)

When a program is run elevated, there is always a request to user, so no specific security threat