I'd like to compile a program which simply kills a task after a previously executed program has quit. This doesn't work without admin privileges.
I'm aware that you can choose "Run program as administrator" from the compatibility tab in the properties of the executable, but if possible I'd like to avoid the necessarity of doing so when distributing the program.
I'm using GCC 4.8.1 on Windows 8.1 to compile.
Edit: About 5 years later I'd propably have gone with system("tskill <processname>")
in this situation, since it doesn't require admin rights on user processes. Alternatively some hack using runas/vbscript.