Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/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://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

winvnc reverse connection + service + autoclose?

Post Reply
robplatt
8
8
Posts: 13
Joined: 2009-11-30 21:51

winvnc reverse connection + service + autoclose?

Post by robplatt »

I quit using SC, and starting using full viewer/winvnc with the reverse option, through the repeater. Works great.

Running as application mode, i can add -sc_exit, which of course closes winvnc.exe after the connection terminates. This is what I want.
Running as a service, I need the same functionality. I install the service, connect to the computer in service mode, and when i disconnect, I want the service to stop/uninstall. I can handle the uninstall but I need to see the service stop so I can know the connection has been terminated. How can I do this?
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: winvnc reverse connection + service + autoclose?

Post by Rudi De Vos »

You can run the stop uninstall service from the systray.

After stop service, vnc restart himself in appliaction mode.
From application mode you can uninstall the service as it isn't longer in use.
robplatt
8
8
Posts: 13
Joined: 2009-11-30 21:51

Re: winvnc reverse connection + service + autoclose?

Post by robplatt »

Hi Rudi, thank you for the reply.


I keep the system tray hidden.
If I have a connection, and I terminate the viewer, the server (service) does not auto stop. i need it to auto stop.

is there any way for the service to auto stop when the viewer disconnects? I'm not using auto-reconnect. I dont want to manually stop it...
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: winvnc reverse connection + service + autoclose?

Post by Rudi De Vos »

Not possible, the whole purpose of a service is that it keeps running. So that when the viewer
disconnect for some reason you can connect again.

The service just monitor if vnc_desktop ( winvnc.exe instance running in a non 0 session) is running.
You actual connect to the vnc_desktop and not to the service.
If you close vnc_desktop, the service restart it for You.
robplatt
8
8
Posts: 13
Joined: 2009-11-30 21:51

Re: winvnc reverse connection + service + autoclose?

Post by robplatt »

Hi Rudi,

I want to be able to see the screen at the login prompt, and interact with UAC (enter credentials/etc). I thought the only way of doing this is with the service installed. I'm not connecting viewer -> server, I'm connecting from server -> repeater -> viewer. I dont need autoreconnect. I need to be able to detect when the session ends. (I have a wrapper)

Is there a keyword in the logfile that I could use? maybe i scan monitor the logfile for something that tells me the session has ended, and then I can shutdown/remove the service programatically. What do you think?
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: winvnc reverse connection + service + autoclose?

Post by Rudi De Vos »

the mslogon.log file log connect and disconnects.
(logmessages.dll need to be in the winvnc.exe folder)
sample in loopback

11/12/2013 19:12 Connection received from 127.0.0.1
11/12/2013 19:12 Connection received from 127.0.0.1
11/12/2013 19:13 Client 127.0.0.1 disconnected

BUT
winvnc.exe is running on logon desktop
User logon
winvnc.exe is stopped and restarted by then service in the user desktop
(You see the reconnect ... on the viewer title bar)
Verify if this doesn't create a flase positive "disconnect" as winvnc.exe is reconnected
from the new session.
robplatt
8
8
Posts: 13
Joined: 2009-11-30 21:51

Re: winvnc reverse connection + service + autoclose?

Post by robplatt »

I wish -sc_exit would work in service_commandline and stop the service, like it terminates the non service instance. that would solve things.

I added logmessages.dll to my working folder, restarted the service, and connected/disconnected, but no mslogon.log file was generated. There is nothing in the debug log that I can use instead?
robplatt
8
8
Posts: 13
Joined: 2009-11-30 21:51

Re: winvnc reverse connection + service + autoclose?

Post by robplatt »

with debug=2, the winvnc.log shows "deleting desktop server" when the session is broken. I will never reuse that log file. Each instance will be clean. So I'll monitor for this, if i see this in the log I will cleanup/uninstall winvnc service. It's dirty, but I think it will work.

Please consider an automatic way to remove the service when the user is not using autoreconnect.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: winvnc reverse connection + service + autoclose?

Post by Rudi De Vos »

logmessages.dll is working, just tested it before answering last post.
It's always working, there is no option to disable it.

No mixup of 32 and 64bit exe/dll
robplatt
8
8
Posts: 13
Joined: 2009-11-30 21:51

Re: winvnc reverse connection + service + autoclose?

Post by robplatt »

I have the vncviewer/winvnc and logmessages.dll from UVNC_1_1_9_xp-win7_X86.zip.

Everything I'm doing is 32bit. I only want one solution for xp-win8.

logmessages.dll is in the folder with winvnc.exe, yet no log. What am I doing wrong?
robplatt
8
8
Posts: 13
Joined: 2009-11-30 21:51

Re: winvnc reverse connection + service + autoclose?

Post by robplatt »

Connecting- http://gyazo.com/6add0c433b6fda3c6e185680b958425d.png
Connected- http://gyazo.com/730aef4211aa9fa0a6c1b84fd73800cf.png (screen shot didnt capture vnc window, but it is working)

No winlogon.log :(
robplatt
8
8
Posts: 13
Joined: 2009-11-30 21:51

Re: winvnc reverse connection + service + autoclose?

Post by robplatt »

AHA! I see logging.dll in the download, tried adding that and its working. so both logging.dll AND logmessages.dll have to be present? Thank you! I'll keep trying with my solution :)
Post Reply