Sign in to follow this  
Followers 0
chall32

Windows Login Screen

8 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (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/remotely

http://adminfoo.net/node/68

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

Edited by lookfar

Share this post


Link to post
Share on other sites

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=15814

A 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]

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0