When finished working with a client computer I want to uninstall the service and leave the computer in a logged off state or rebooted state.
I've increased the delay from 15sec but I'm still uncertain about how it would work reliably
1. close down all running programs on client computer
2. start the uninstall process
3. start the logoff or reboot
Is there anyway to be sure the uninstall succeeds before the logoff/reboot kicks in?
A reboot with a "run once" ChunkVNC process comes to mind as an alternative.
JonD
After more 1 000 000 (one million) views on forum for 1.5.0.x development versions... and 1.6.0.0 version
A new stable version, UltraVNC 1.6.1.0 and UltraVNC SC 1.6.1.0 have been released: https://forum.uvnc.com/viewtopic.php?t=38080
Feedback is welcome
Celebrating the 22th anniversary of the UltraVNC (25th anniversary since the laying of the foundation stone): https://forum.uvnc.com/viewtopic.php?t=38031
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864
Forum password change request: https://forum.uvnc.com/viewtopic.php?t=38078
Development: UltraVNC development is always here... Any help is welcome.
A new development version, UltraVNC 1.6.3.0-dev has been released, please test it: https://forum.uvnc.com/viewtopic.php?t=38091
Feedback is welcome
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Bluesky/AT Protocol: https://bsky.app/profile/ultravnc.bsky.social
- 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
A new stable version, UltraVNC 1.6.1.0 and UltraVNC SC 1.6.1.0 have been released: https://forum.uvnc.com/viewtopic.php?t=38080
Feedback is welcome
Celebrating the 22th anniversary of the UltraVNC (25th anniversary since the laying of the foundation stone): https://forum.uvnc.com/viewtopic.php?t=38031
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864
Forum password change request: https://forum.uvnc.com/viewtopic.php?t=38078
Development: UltraVNC development is always here... Any help is welcome.
A new development version, UltraVNC 1.6.3.0-dev has been released, please test it: https://forum.uvnc.com/viewtopic.php?t=38091
Feedback is welcome
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Bluesky/AT Protocol: https://bsky.app/profile/ultravnc.bsky.social
- 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
Uninstall service + logoff on client computer - solved
Uninstall service + logoff on client computer - solved
Last edited by JonD on 2010-10-25 19:23, edited 1 time in total.
Re: Uninstall service + logoff on client computer
You could edit the SRC\ChunkVNC.au3 which controls the service install and uninstall to do a SHUTDOWN command in -t seconds.
Sorry I don't have a better answer, would require some coding on your part.
Code: Select all
c:\>shutdown /?
Usage: SHUTDOWN [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-d up:xx:yy]
No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without warning
-d [u][p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)
Sorry I don't have a better answer, would require some coding on your part.
ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
Re: Uninstall service + logoff on client computer
That sounds like a very good solution. I think I'll play with creating 2 versions of ChunkVNC so that there's an option without the shutdown action.
I just need for security reasons, to leave an unattended machine in a relatively secure mode after I finish and I don't want the service left installed.
JonD
I just need for security reasons, to leave an unattended machine in a relatively secure mode after I finish and I don't want the service left installed.
JonD
Re: Uninstall service + logoff on client computer
How about using autoit shutdown vs shellexecute shutdown?
The windows shutdown does have some extra options but perhaps the autoit shutdown will handle different OS's better?
Any thoughts on this?
JonD
The windows shutdown does have some extra options but perhaps the autoit shutdown will handle different OS's better?
Any thoughts on this?
JonD
Re: Uninstall service + logoff on client computer
Well that was fairly easy... thanks to supercoe for the suggestion:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Code: Select all
Else
If MsgBox( 4, "wdHelp", "Remove Service and Uninstall?" ) = 6 Then
$UninstallMsg = "Please close the viewer now, uninstall will continue in 15 seconds..."
If MsgBox( 4, "", "Reboot computer after Uninstall?" ) = 6 Then
$Reboot = True
$UninstallMsg = "Please close the viewer now, uninstall/reboot will continue in 15 seconds..."
Else
$Reboot = False
endif
; Allow viewer to disconnect to prevent schook.dll locking.
MsgBox( 0, "Information", $UninstallMsg, 15 )
; Uninstall service.
ShellExecute( $ChunkVNCPath & "\InstantSupportVNC.exe", "-uninstall" )
; Wait for InstantSupportVNC.exe to end.
ProcessWaitClose( "InstantSupportVNC.exe", 10 )
;no longer used because I create a desktop bat instead
;FileDelete( @DesktopCommonDir & $wdHelpLnk )
; Remove files... use RunWait not Run in _SelfDelete
; ChunkVNC.exe will remain since it is the running program
_SelfDelete(5)
; wait 15 seconds
Sleep(15000)
If $Reboot Then
ShellExecute("shutdown.exe"," -r -f -t 60", @SystemDir)
EndIf
EndIf
EndIf
Re: Uninstall service + logoff on client computer
Good, that was the idea of keeping the project open source.JonD wrote:Well that was fairly easy... thanks to supercoe for the suggestion:

ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!