Update ServiceInstaller.cpp

Some very minor changes to this PR
This commit is contained in:
Adam Ierymenko 2022-03-07 13:52:05 -05:00 committed by GitHub
parent 12900d914a
commit e1a3285273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ std::string InstallService(PSTR pszServiceName,
SC_HANDLE schSCManager = NULL; SC_HANDLE schSCManager = NULL;
SC_HANDLE schService = NULL; SC_HANDLE schService = NULL;
SERVICE_DESCRIPTION sd; SERVICE_DESCRIPTION sd;
LPTSTR szDesc = TEXT("Provides secure encrypted communications between hosts over an insecure networks."); LPTSTR szDesc = TEXT("ZeroTier network virtualization service.");
if (GetModuleFileName(NULL, szPathTmp, ARRAYSIZE(szPath)) == 0) if (GetModuleFileName(NULL, szPathTmp, ARRAYSIZE(szPath)) == 0)
{ {
@ -98,9 +98,7 @@ std::string InstallService(PSTR pszServiceName,
// Setup service description // Setup service description
sd.lpDescription = szDesc; sd.lpDescription = szDesc;
if (!ChangeServiceConfig2(schService, SERVICE_CONFIG_DESCRIPTION, &sd)) { ChangeServiceConfig2(schService, SERVICE_CONFIG_DESCRIPTION, &sd);
ret = "CreateService failed (description)";
}
Cleanup: Cleanup:
// Centralized cleanup for all allocated resources. // Centralized cleanup for all allocated resources.
if (schSCManager) if (schSCManager)