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

Reboot hook

Any features you would like to see in UltraVNC? Propose it here
Post Reply
Jeroen Pluimers

Reboot hook

Post by Jeroen Pluimers »

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
Guest

Post by Guest »

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.
Leonard

Close Applications

Post by Leonard »

Close all applications prior to reboot.

If you have a hung application that you are trying to restart consider using pskill (http://www.sysinternals.com/ntw2k/freeware/pskill.shtml)

Which will stop hung services (I have found this valuable with rogue VNC services).
MBV
8
8
Posts: 10
Joined: 2004-04-23 11:43

Post by MBV »

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


[HKEY_CURRENT_USER\Control Panel\Desktop]
"AutoEndTasks"="1"
"HungAppTimeout"="7000"
"WaitToKillAppTimeout"="7000"


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"WaitToKillServiceTimeout"="10000"
Davin

Post by Davin »

I agree, I want this too. This is the only feature Remote Administrator has over UltraVNC that I need.
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Post by UltraSam »

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.
UltraSam
MBV
8
8
Posts: 10
Joined: 2004-04-23 11:43

Post by MBV »

Optionally would be better.

Some people may think that those registry changes are somewhat intrusive.
prandal
20
20
Posts: 36
Joined: 2004-06-08 15:24

Post by prandal »

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.

Phil
paperjam
Posts: 6
Joined: 2004-06-09 07:03
Contact:

Post by paperjam »

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").

Paperjam

Edit: I just searched for that API-function on MSDN. Here it is:
http://msdn.microsoft.com/library/defau ... dowsex.asp

An optional parameter can force the system to end processes, but this does not work with Windows 9x/Me/NT!
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Post by UltraSam »

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.
UltraSam
Guest

Post by Guest »

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

Post by Yesod »

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.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6862
Joined: 2004-04-23 10:21
Contact:

Post by Rudi De Vos »

TEST19 versions close as last application on reboot.

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

Post by Rudi De Vos »

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

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

Great!

Post by Vinzz »

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

Post by c_schmitz »

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!

Carsten
Guest

Forced reboot - a different angle

Post by Guest »

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!!!)

Thanks
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6862
Joined: 2004-04-23 10:21
Contact:

Post by Rudi De Vos »

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.
Post Reply