Reboot hook

Any feature you'd like to see in Ultr@VNC? Just propose it here.

Reboot hook

Postby Jeroen Pluimers » 2004-06-07 10:07

Right now, when you reboot a remote system through a VNC client, the connection is immediately dropped.

From that point on, you cannot reconnect, unless the computer actually boots.

However, sometimes there are programms that don't want to stop (with taskmgr kicking in), or ask a "do you really want to quit" message.

Since you cannot reconnect to the VNC service, it is impossible to answer those questions.

It would be nice if VNC could have a hook where it only terminates the connection in a later phase: when the interactive applications have died.

Jeroen Pluimers

Postby Guest » 2004-06-07 10:22

What you propose is quite difficult to implement...

But we could implement reboot
1) normal
2) don't wait (don't save and wair for applications)
3) reset (like pression reset button)

When selecting reboot with option 2 or 3 will reboot the system,
but risk the loose unsaved data.

For beta 2...first rel 1 need to be out.

Close Applications

Postby Leonard » 2004-06-07 11:12

Close all applications prior to reboot.

If you have a hung application that you are trying to restart consider using pskill (

Which will stop hung services (I have found this valuable with rogue VNC services).

Postby MBV » 2004-06-07 16:53

Maybe some changes in registry can help you (do a backup first):

[HKEY_CURRENT_USER\Control Panel\Desktop]

Posts: 10
Joined: 2004-04-23 11:43

Postby Davin » 2004-06-11 15:24

I agree, I want this too. This is the only feature Remote Administrator has over UltraVNC that I need.

Postby UltraSam » 2004-06-11 16:30

Thanks for this reg infos :)

We're going to evaluate if we can reasonably make WinVNC add this values (optionaly or by default) to the host server.
Admin & Developer
Admin & Developer
Posts: 466
Joined: 2004-04-26 20:55

Postby MBV » 2004-06-11 23:36

Optionally would be better.

Some people may think that those registry changes are somewhat intrusive.
Posts: 10
Joined: 2004-04-23 11:43

Postby prandal » 2004-06-11 23:43

MBV wrote:Optionally would be better.

Some people may think that those registry changes are somewhat intrusive.

The solution, if possible, is to do the following on a VNC-sent reboot request:

1: Save current values of those keys
2: Put something into the RunOnce on startup to restore those values (you could even do it on start of VNC service instead)
3: Change registry
4: Initiate reboot

That way the keys are set to the "dangerous" values for a minimal amount of time.

Posts: 36
Joined: 2004-06-08 15:24

Postby paperjam » 2004-06-12 19:17

Actually, changing those registry entries is not necessary, as it has the same effect as initiating a "forced reboot" using the Windows-API, which is exactely what the "guest" in the first reply suggested as option "2)".
What prandal suggests is, as far as I can tell, unnecessary, although it is probably a working solution (But it's not as clean as a simple "forced reboot").


Edit: I just searched for that API-function on MSDN. Here it is: ... dowsex.asp

An optional parameter can force the system to end processes, but this does not work with Windows 9x/Me/NT!
Posts: 6
Joined: 2004-06-09 07:03

Postby UltraSam » 2004-06-12 22:26

The guest you're talking about is presumably Rudi.

Forcing all apps to end-up immediatly is not too difficult to do (changing registry seetings (I didn't know this trick) or forcing them using the API (already used this one). But that's an easy and dangerous shortcut...

The problem is that the user doesn't know if there's a risk for some of the running app not to have correctly saved its data before shutting down.

PCAnywhere seems to be able to be almost the ultimate process to be shut down when windows closes or reboots. So the connected user can see and answer all the prompt messages of closing applications before beeing disconnected.

We've to find the trick to do the same thing with Ultra, so the viewer is not dropped too early during the windows shut down process.
Admin & Developer
Admin & Developer
Posts: 466
Joined: 2004-04-26 20:55

Postby Guest » 2004-08-06 16:50

It would be really great if that problem could be resolved... a lot of people would be very grateful (including me ;) )

Postby Yesod » 2004-08-18 13:06

Maybe theres a way if you handle the WM_QUERYENDSESSION message and return False.
But this seems to be only working in NT

Windows NT: When an application returns TRUE for this message, it receives the WM_ENDSESSION message and it is terminated, regardless of how the other applications respond to the WM_QUERYENDSESSION message.

Windows 95: After all applications return TRUE for this message, they receive the WM_ENDSESSION and they are terminated.

Postby Rudi De Vos » 2004-08-18 14:33

TEST19 versions close as last application on reboot.

You even see windows closing ....
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6106
Joined: 2004-04-23 10:21

Postby Rudi De Vos » 2004-08-18 23:28

TEST19_5 online

Viewer close after logoff screen.
If applicating block (dos box) , server and viewer are not disconnected. You can use vnc to close the dos windows.

No reg changes, needed

:) :) :) :)
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6106
Joined: 2004-04-23 10:21


Postby Vinzz » 2004-08-20 14:00

Posts: 35
Joined: 2004-05-10 14:40
Location: Belgium/EU

Postby c_schmitz » 2004-09-03 06:50

Wow. that sounds great...

Would you consider to release a new version since i have the problem that i cant compile it myself??

Thank you for your great work!

Posts: 2
Joined: 2004-08-06 09:10

Forced reboot - a different angle

Postby Guest » 2004-09-24 21:37

What has been discussed here so far is what happens when a remote admin with a working connection chooses to reboot the remote system (ie: Click Start...Shutdown..etc)

How about when you can make a connection to the remote system, but all you get is a blank screen (ie: XP task switched screens and issues with using RDP at the same time) - what if the VNC server could be set up with a 'reboot' password so that if a VNC remote login was being authenticated but you found yourself facing a black screen, you could disconnect and then reconnect using the 'reboot' password which would instantly reboot the remote machine?

Before you hold up your hands in horror, I appreciate that this could lead to loss of data etc. if there are apps open, but I am mature enough to judge when I really need to use this type of function (like right now on a remote notebook PC!!!)


Postby Rudi De Vos » 2004-09-24 21:50

Perhaps we could add a admin, console.
A remote dosbox (like the old unix telnet connection)

From there you can do what you want, reboot restart services....this would be more functional then making a
button to reboot.
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6106
Joined: 2004-04-23 10:21

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 5 guests