X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=nssm.cpp;h=e29ead6531ab653f835ed445cc95daa405d6724b;hb=cca8d28295ce27b7c996b47badc6a1e3a6a34e65;hp=35001d312c5d688b225fd69ae98d23c40269e466;hpb=aece13df3cc7a17d5827cc59fc59c13538b52517;p=nssm.git diff --git a/nssm.cpp b/nssm.cpp index 35001d3..e29ead6 100644 --- a/nssm.cpp +++ b/nssm.cpp @@ -77,6 +77,9 @@ int _tmain(int argc, TCHAR **argv) { /* Remember if we are admin */ check_admin(); + /* Set up function pointers. */ + if (get_imports()) exit(111); + /* Elevate */ if (argc > 1) { /* @@ -137,9 +140,6 @@ int _tmain(int argc, TCHAR **argv) { This will save time when running with no arguments from a command prompt. */ if (! GetStdHandle(STD_INPUT_HANDLE)) { - /* Set up function pointers. */ - if (get_imports()) exit(111); - /* Start service magic */ SERVICE_TABLE_ENTRY table[] = { { NSSM, service_main }, { 0, 0 } }; if (! StartServiceCtrlDispatcher(table)) {