Jump to content

Windows Login Screen


chall32
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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/remotely

http://adminfoo.net/node/68

http://www.gensortium.com/products/gencontrol.html

Edited by lookfar
Link to comment
Share on other sites

@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! :P

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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) :P

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...