Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Small patch proposed

Developers may discuss here
Post Reply
Peter2121
Posts: 1
Joined: 2020-04-24 08:55

Small patch proposed

Post by Peter2121 »

Hello,
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;
 }
 ////////////////////////////////////////////////////////////////////////////////
There are two limitations though:
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
Neustradamus
20
20
Posts: 54
Joined: 2011-03-26 20:22

Re: Small patch proposed

Post by Neustradamus »

@Rudi De Vos: have you seen?
Neustradamus
20
20
Posts: 54
Joined: 2011-03-26 20:22

Re: Small patch proposed

Post by Neustradamus »

@Peter2121: UltraVNC is now on GitHub, can you create a PR?
- https://github.com/ultravnc/ultravnc
Post Reply