X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=nssm.cpp;h=7c956112065144957696bcc1e0dc6b85a2df413f;hb=2c60e5334f6df07bf42e7a91cf59638453eca473;hp=86a18275328f168a91e31c2103456b69ca5097b9;hpb=5b9e64a9ae1fbf1254c9c246e5b123d3aa77a37a;p=nssm.git diff --git a/nssm.cpp b/nssm.cpp index 86a1827..7c95611 100644 --- a/nssm.cpp +++ b/nssm.cpp @@ -45,7 +45,7 @@ int _tmain(int argc, TCHAR **argv) { /* Elevate */ if (argc > 1) { - /* Valid commands are install or remove */ + /* Valid commands are install, edit or remove */ if (str_equiv(argv[1], _T("install"))) { if (! is_admin) { print_message(stderr, NSSM_MESSAGE_NOT_ADMINISTRATOR_CANNOT_INSTALL); @@ -53,6 +53,13 @@ int _tmain(int argc, TCHAR **argv) { } exit(pre_install_service(argc - 2, argv + 2)); } + if (str_equiv(argv[1], _T("edit"))) { + if (! is_admin) { + print_message(stderr, NSSM_MESSAGE_NOT_ADMINISTRATOR_CANNOT_EDIT); + exit(100); + } + exit(pre_edit_service(argc - 2, argv + 2)); + } if (str_equiv(argv[1], _T("remove"))) { if (! is_admin) { print_message(stderr, NSSM_MESSAGE_NOT_ADMINISTRATOR_CANNOT_REMOVE);