New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow running lokinet as root on windows #1347
Conversation
($PROGRAMDATA/.lokinet/lokinet.ini) - oops forgot to eat my own command line args
@@ -329,8 +332,7 @@ lokinet_main(int argc, char* argv[]) | |||
options.add_options()("v,verbose", "Verbose", cxxopts::value<bool>()) | |||
#ifdef _WIN32 | |||
("install", "install win32 daemon to SCM", cxxopts::value<bool>())( | |||
"remove", "remove win32 daemon from SCM", cxxopts::value<bool>())( | |||
"win32-daemon", "do not use interactively", cxxopts::value<bool>()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we no longer need the entry in cxxopts..................
ReportSvcStatus(SERVICE_START_PENDING, NO_ERROR, 3000); | ||
// SCM clobbers startup args, regenerate them here | ||
argc = 2; | ||
argv[1] = "c:/programdata/.lokinet/lokinet.ini"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.....................because we eat it here: becomes [path to lokinet] [path to config file]
TODO: for internal testing use $ALLUSERSPROFILE/Appplication Data/.lokinet
(programdata didn't exist yet)
this fixed the service startup crash: scm kept chewing up the command line arguments |
indeed after this and #1348 i am no longer making much of an effort to deal with pre-windows 8 |
by relocating to (
$PROGRAMDATA/.lokinet
)