Changeset 80927 in vbox
- Timestamp:
- Sep 20, 2019 4:43:15 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-win.cpp
r80573 r80927 487 487 com::Utf8Str sServiceName; 488 488 int vrc = autostartGetServiceName(pszUser, sServiceName); 489 if ( !RT_FAILURE(vrc))489 if (RT_FAILURE(vrc)) 490 490 return autostartSvcDisplayError("delete - DeleteService failed, service name for user %s can not be constructed.\n", 491 491 pszUser); … … 614 614 */ 615 615 com::Utf8StrFmt sCmdLine("\"%s\" --service=%s", szExecPath, sServiceName.c_str()); 616 com::Bstr bstrServiceName(sServiceName); 617 com::Bstr bstrDisplayName(sDisplayName); 618 com::Bstr bstrCmdLine(sCmdLine); 619 com::Bstr bstrUserFullName(sUserFullName); 620 com::Bstr bstrPwd(strPwd); 621 616 622 SC_HANDLE hSvc = CreateServiceW(hSCM, /* hSCManager */ 617 com::Bstr(sServiceName).raw(),/* lpServiceName */618 com::Bstr(sDisplayName).raw(),/* lpDisplayName */623 bstrServiceName.raw(), /* lpServiceName */ 624 bstrDisplayName.raw(), /* lpDisplayName */ 619 625 SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_QUERY_CONFIG, /* dwDesiredAccess */ 620 626 SERVICE_WIN32_OWN_PROCESS, /* dwServiceType ( | SERVICE_INTERACTIVE_PROCESS? ) */ 621 627 SERVICE_AUTO_START, /* dwStartType */ 622 628 SERVICE_ERROR_NORMAL, /* dwErrorControl */ 623 com::Bstr(sCmdLine).raw(),/* lpBinaryPathName */629 bstrCmdLine.raw(), /* lpBinaryPathName */ 624 630 NULL, /* lpLoadOrderGroup */ 625 631 NULL, /* lpdwTagId */ 626 632 NULL, /* lpDependencies */ 627 com::Bstr(sUserFullName).raw(),/* lpServiceStartName (NULL => LocalSystem) */628 com::Bstr(strPwd).raw());/* lpPassword */633 bstrUserFullName.raw(), /* lpServiceStartName (NULL => LocalSystem) */ 634 bstrPwd.raw()); /* lpPassword */ 629 635 if (hSvc) 630 636 {
Note:
See TracChangeset
for help on using the changeset viewer.