chall32 Posted September 21, 2005 Posted September 21, 2005 All,This is my first post, so plese be gentle!On to my question.... I've written a script to install access and then remove UltraVNC server on remote machines. As part of the UltraVNC removal process I have to issue a command which causes a small OK popup to appear on the screen of the remote machine. Here is the script I use to remove UltraVNC server and close the offending popup:Opt("TrayIconHide", 1)AutoItSetOption("WinTitleMatchMode", 1)RunWait(@ComSpec & " /C" & 'net stop winvnc', @TempDir, @SW_HIDE)RunWait(@ComSpec & " /C" & 'c:\vnctemp\winvnc.exe -kill', @TempDir, @SW_HIDE)Run(@ComSpec & " /C" & 'c:\vnctemp\winvnc.exe -remove', @TempDir, @SW_HIDE)WinWait("WinVNC", "The WinVNC service has been unregistered", 5)WinActivate("WinVNC", "The WinVNC service has been unregistered")ControlClick( "WinVNC", "The WinVNC service has been unregistered", 2)RunWait(@ComSpec & " /C" & 'regedit /s c:\vnctemp\removevncreg.reg', @TempDir, @SW_HIDE)Sleep(2500)RunWait(@ComSpec & " /C" & 'rd /s /q c:\vnctemp', @TempDir, @SW_HIDE)This works well when a user is logged in to the remote machine but not at the windows NT/2K/2K3 login screen - the script wont close the offending popup. Does anyone know how to control windows at the windows NT / 2K / 2K3 login screen?
lookfar Posted September 22, 2005 Posted September 22, 2005 (edited) All,This is my first post, so plese be gentle!On to my question.... I've written a script to install access and then remove UltraVNC server on remote machines. As part of the UltraVNC removal process I have to issue a command which causes a small OK popup to appear on the screen of the remote machine. Here is the script I use to remove UltraVNC server and close the offending popup:This works well when a user is logged in to the remote machine but not at the windows NT/2K/2K3 login screen - the script wont close the offending popup. Does anyone know how to control windows at the windows NT / 2K / 2K3 login screen?perhaps an easier solution would be to use GenControl, it installs and un-installs silently/remotelyhttp://adminfoo.net/node/68http://www.gensortium.com/products/gencontrol.html Edited September 22, 2005 by lookfar Get the latest version of AutoEd and Koda FormDesigner here
Marcus Posted September 22, 2005 Posted September 22, 2005 The Windows Logon Screen in XP etc. is an absolute menace.There are a couple of other ideas here:http://www.autoitscript.com/forum/index.php?showtopic=15814A lot of this might relate to what you're looking at here . . . [center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center]
AutoChris Posted September 27, 2005 Posted September 27, 2005 I don't know if this will solve your problem, but I use fastpush to install and uninstall VNC. It is very easy to use and you can easily push out whatever settings you like using this batch file. (Yes, it is just a DOS batch file)
Michel Claveau Posted September 27, 2005 Posted September 27, 2005 Hi ! *Sorry for my bad english* In XP/2000, when no session are open, process run under the "system" account. And "system" has no full access (it had many limits). It's perhaps the reason of your problem.
chall32 Posted September 29, 2005 Author Posted September 29, 2005 @All, Thanks for the feedback - much apreciated. I've got round the problem by not using UltraVNC's remove command - or install for that matter A quick bit of looking through UltraVNC's source code and I found that it uses the NT Serice Controller to install and uninstall itself. Lucilly you can use the service controller functions on remote machines also! So, the UltraVNC install code looks like:RunWait(@ComSpec & " /C" & 'sc.exe \\%Target% create winvnc binpath= "c:\vnctemp\winvnc.exe -service" start= auto type= own type= interact error= ignore DisplayName= "VNC Server (ChrisControl)"', @SystemDir, @SW_HIDE) RunWait(@ComSpec & " /C" & 'sc.exe \\%Target% start winvnc', @SystemDir, @SW_HIDE) And the uninstall code looks like:RunWait(@ComSpec & " /C" & 'sc.exe \\%Target% stop winvnc', @SystemDir, @SW_HIDE) RunWait(@ComSpec & " /C" & 'sc.exe \\%Target% delete winvnc', @SystemDir, @SW_HIDE) %Target% being the remote machine. Lovely-jubbly!
jefhal Posted September 29, 2005 Posted September 29, 2005 Just out of curiosity, does removing just the service still leave the installation files and folders on the target machine? I know it's not too much of a problem, but at a school, kids will find anything and try it... ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
chall32 Posted September 30, 2005 Author Posted September 30, 2005 Just out of curiosity, does removing just the service still leave the installation files and folders on the target machine? I know it's not too much of a problem, but at a school, kids will find anything and try it... Stopping and removing the service will leave the installation files. I also run:RegDelete("\\" & $Hst & "\" & "HKEY_LOCAL_MACHINE\SOFTWARE\ORL") RegDelete("\\" & $Hst & "\" & "HKEY_CURRENT_USER\SOFTWARE\ORL") RegDelete("\\" & $Hst & "\" & "HKEY_USERS\.DEFAULT\Software\ORL") RegDelete("\\" & $Hst & "\" & "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "WinVNC") RunWait(@ComSpec & " /C" & 'rd /s /q \\%Target%\c$\vnctemp', @TempDir, @SW_HIDE)To remove VNC from the target machine ($Hst)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now