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
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
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.
http://www.chunkvnc.com - 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:
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!