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
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
Reboot hook
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
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
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.
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
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).
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).
The solution, if possible, is to do the following on a VNC-sent reboot request:MBV wrote:Optionally would be better.
Some people may think that those registry changes are somewhat intrusive.
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
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!
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!
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.
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
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.
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.
- Rudi De Vos
- Admin & Developer
- Posts: 6862
- Joined: 2004-04-23 10:21
- Contact:
- Rudi De Vos
- Admin & Developer
- Posts: 6862
- Joined: 2004-04-23 10:21
- Contact:
Forced reboot - a different angle
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
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
- Rudi De Vos
- Admin & Developer
- Posts: 6862
- Joined: 2004-04-23 10:21
- Contact: