rem: Ns_Log(Notice, "nswin32: installing service '%s'", name.string);
add: Ns_Log(Notice, "nswin32: installing %s service: %s", name.string, cmd.string);
context: NsInstallService(void){    SC_HANDLE       hmgr, hsrv;    BOOL	    ok;    char	    nsd[PATH_MAX], carg[10], config[PATH_MAX];    Ns_DString	    name, cmd;    ok = FALSE;    if (_fullpath(config, nsconf.config, sizeof(config)) == NULL) {	Ns_Log(Error, "nswin32: invalid config path '%s'", nsconf.config);    } else if (!GetModuleFileName(NULL, nsd, sizeof(nsd))) {	Ns_Log(Error, "nswin32: failed to find nsd.exe: '%s'", SysErrMsg());    } else {	sprintf(carg, " -%c ", nsconf.configfmt);	Ns_DStringInit(&name);	Ns_DStringInit(&cmd);	Ns_DStringVarAppend(&cmd, nsd,	    " -S -s ", nsServer, carg, config, NULL);    	if (nsMemPools) {	    Ns_DStringAppend(&cmd, " -z");	}	GetServiceName(&name);	Ns_Log(Notice, "nswin32: installing service '%s'", name.string);	hmgr = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);	if (hmgr != NULL) {	    hsrv = CreateService(hmgr, name.string, name.string,		SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS,		SERVICE_AUTO_START, SERVICE_ERROR_NORMAL,		cmd.string, NULL, NULL, "TcpIp\0", NULL, NULL);	    if (hsrv != NULL) {		CloseServiceHandle(hsrv);		ok = TRUE;	    }	    CloseServiceHandle(hmgr);	}	if (!ok) {	    Ns_Log(Error, "nswin32: failed to install service '%s': '%s'",		   name.string, SysErrMsg());	}	Ns_DStringFree(&name);	Ns_DStringFree(&cmd);    }    return (ok ? NS_OK : NS_ERROR);}