From 68d7ef214ab03e86a351138d778b094d88d082ef Mon Sep 17 00:00:00 2001 From: utthungagokul <93976549+utthungagokul@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:02:01 +0530 Subject: [PATCH] Update COpcClassFactory.cpp enclosed double quotes to ensure the service path. --- ComIOP/Wrapper/Common/COpcClassFactory.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ComIOP/Wrapper/Common/COpcClassFactory.cpp b/ComIOP/Wrapper/Common/COpcClassFactory.cpp index 9b6bb79d..72286be6 100644 --- a/ComIOP/Wrapper/Common/COpcClassFactory.cpp +++ b/ComIOP/Wrapper/Common/COpcClassFactory.cpp @@ -68,6 +68,10 @@ static bool InstallService( GOTOFINALLY(); } + //append the double quotes - Registery Image Path (Security) + COpcString binaryPath = tsFilePath; + binaryPath = "\"" + binaryPath + "\""; + // create service. hService = CreateService( hSCM, @@ -77,7 +81,7 @@ static bool InstallService( SERVICE_WIN32_OWN_PROCESS, SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, - tsFilePath, + binaryPath, NULL, NULL, _T("RPCSS\0"),