|
|
|
@ -1,13 +1,11 @@
|
|
|
|
|
// to-do:
|
|
|
|
|
// write argument parser
|
|
|
|
|
// create cli program
|
|
|
|
|
// maybe make a ui for this
|
|
|
|
|
// make a ui for this
|
|
|
|
|
//
|
|
|
|
|
#include "dcontrol.hpp"
|
|
|
|
|
#include "wmic.hpp"
|
|
|
|
|
#include "trusted.hpp"
|
|
|
|
|
|
|
|
|
|
int main(int argc, int **argv)
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
|
{
|
|
|
|
|
if (!trusted::has_admin())
|
|
|
|
|
{
|
|
|
|
@ -19,9 +17,10 @@ int main(int argc, int **argv)
|
|
|
|
|
// Because we are a primary token, we can't swap ourselves with an impersonation token.
|
|
|
|
|
// There will always be a need to re-create the process with the token as primary.
|
|
|
|
|
//
|
|
|
|
|
if (!trusted::is_system_group() && argc != 2)
|
|
|
|
|
if (!trusted::is_system_group() && argc == 1)
|
|
|
|
|
{
|
|
|
|
|
auto path = util::get_current_path();
|
|
|
|
|
auto pid = trusted::start_trusted();
|
|
|
|
|
|
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
|
}
|
|
|
|
|