Playing with winvnc.exe, I noticed that in case of starting winvnc.exe with -install argument (to install the service) it ignores -inifile argument, so it is impossible to install the service with a custom path of ini file. Hopefully, the fix is trivial, so I propose the following patch to include in a future release:
Code: Select all
--- service_motor.cpp.orig	2020-03-13 10:23:51.952582000 +0100
+++ service_motor.cpp	2020-04-24 10:46:24.331245000 +0200
@@ -334,7 +334,13 @@
 
     strcpy_s(service_path, "\"");
     strcat_s(service_path, exe_file_name);
-	strcat_s(service_path, "\" -service");
+	strcat_s(service_path, "\"");
+	if (g_szIniFile)
+	{
+		strcat_s(service_path, " -inifile ");
+		strcat_s(service_path, g_szIniFile);
+	}
+	strcat_s(service_path, " -service");
 	return 0;
 }
 ////////////////////////////////////////////////////////////////////////////////
1. No spaces in ini file path (escaping does not work)
2. service_commandline option with -inifile argument must be present in ini file himself
