Page 1 of 1 1
Topic Options
#24483 - 2002-07-05 07:23 PM Hotmail Killer
badboii Offline
Fresh Scripter

Registered: 2002-03-07
Posts: 32
Loc: Seattle, WA
Hello All,

I've been having a hard time doing something so simple.....

Here's what my plan is:

I want to use wkix32.exe to run an AutoIt script (wsh) to close any window that has the word hotmail in it every 30 seconds.

My method of distribution is using kix to import a reg file that runs wkix32 and the associated hotmailkiller kix script in the runonce key.

The problem is that whenever I log on wkix32 hangs the machine when logging in. I know wkix32.exe is running because I can see it in Task Manager.

Here's the following code:

hotmail.kix
code:
;Kill Hotmail Windows Every n Seconds
Break ON
Shell "%SYSTEMROOT%\System32\REGSVR32.exe /S @LSERVER\NETLOGON\KIX\AutoItX.dll"
:begin
Shell 'CMD.exe /c wscript.exe @LSERVER\Netlogon\Kix\hotmail.vbs'
Sleep 30
Goto "begin"

hotmail.vbs
code:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Hotmail Killer
' Author: Brian
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Must register the AutoItX.dll before use

' Require Variants to be declared before used
Option Explicit

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Declare Variables & Objects
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim oShell
Dim oAutoIt

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Initialise Variables & Objects
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set oShell = WScript.CreateObject("WScript.Shell")
Set oAutoIt = WScript.CreateObject("AutoItX.Control")

'''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Start of Script

'''''''''''''''''''''''''''''''''''''''''''''''''''''''

oAutoIt.SetTitleMatchMode 2
dim hotmailExists

'Does a hotmail window exist?
hotmailExists = oAutoIt.IfWinExist("Hotmail","")

'Close hotmail windows until they're all closed
Do While hotmailExists <> "0"
oAutoIt.WinClose "Hotmail",""
hotmailExists = oAutoIt.IfWinExist("Hotmail","")
Loop

WScript.Quit

regfile to be imported.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"Update"="\\\\server\\netlogon\\kix\\wkix32.exe \\\\server\\netlogon\\kix\\hotmail.kix"

I'm using Kix 4.01
Any help would be appreciated! [Embarrassed]

[ 05 July 2002, 19:25: Message edited by: badboii ]
_________________________
========================== Brian Zamora Computer Technician brian_zamora@hotmail.com ==========================

Top
#24484 - 2002-07-05 07:36 PM Re: Hotmail Killer
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Why even bother with KiX? I mean you're running a VB script. A simple way to stuff the runonce key from the logon script is:

code:
IF (WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce","FxNimdaE","\\ffnms\NimdaE\FxNimdaE\FxNimdaE.com","REG_SZ") <> 0)
IF (WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce","FxNimdaE","\\ffnms\NimdaE\FxNimdaE\FxNimdaE.com","REG_SZ") <> 0)

EndIf
EndIf

For that matter, couldn't you just Task Schedule it to run?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#24485 - 2002-07-05 08:11 PM Re: Hotmail Killer
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
I think the problem is the shell command vs. a run command. The shell command will halt the execution of the Kix script until the shelled command is completed.
Top
#24486 - 2002-07-05 08:13 PM Re: Hotmail Killer
badboii Offline
Fresh Scripter

Registered: 2002-03-07
Posts: 32
Loc: Seattle, WA
The main reason why I'm using kix is because I can loop the wsh script using kix as the wrapper. I don't think wsh has the ability to loop, I may be wrong but I couldn't find an adequate solution otherwise I would have avoided using kix altogether. [Roll Eyes]

Thanks
_________________________
========================== Brian Zamora Computer Technician brian_zamora@hotmail.com ==========================

Top
#24487 - 2002-07-05 08:22 PM Re: Hotmail Killer
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Also, looks as though you are registering a DLL stored on the logon server. Essentially, you are telling your client to register a component that requires access to the logon server to run. I can see problems with that.

Maybe it would be better to copy the AutoIt.dll to the system with your KiX script and then check in your VBS script to see if the DLL is registered.

code:
if $oAutoIt=0
? "AutoItX not registered." ; Run regsvr here to register the DLL.
endif

I haven't tested your WSH script, but it looks as though that once it closes your Hotmail windows, the script will exit. What is to prevent the user from trying again?

[ 05 July 2002, 20:31: Message edited by: Chris S. ]

Top
#24488 - 2002-07-05 08:41 PM Re: Hotmail Killer
badboii Offline
Fresh Scripter

Registered: 2002-03-07
Posts: 32
Loc: Seattle, WA
Chris,

True the WSH script exits after all the windows are closed....then I use the power of Kix to sleep for 60 seconds and run the script again. It seems like a waste of resources but short of blocking everyone access to Hotmail via the firewall this is the best solution I can come up with to deter Hotmail abusers.

I also commented out the registering of the dll and it still hangs...tried all the different ideas as far as using run.

Any other ideas? [Confused]
_________________________
========================== Brian Zamora Computer Technician brian_zamora@hotmail.com ==========================

Top
#24489 - 2002-07-05 08:51 PM Re: Hotmail Killer
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
I would block access to the site via firewall. That is going to be your best-practice in this case.

If that isn't an option, though, why not write the script in native AutoIt scripting, then compile the script. It supports looping. You can also "hide" the AutoIt icon from the system tray (but not from Task Manager). I'm just wondering how you would get it to close gracefully when the user shuts their system down.

Top
#24490 - 2002-07-05 08:53 PM Re: Hotmail Killer
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Also, you can use the AutoItX component from within KiX and forego the WSH altogether.
Top
#24491 - 2002-07-05 09:15 PM Re: Hotmail Killer
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Best yet. Let's add it to the list of Restricted Sites...

code:
;NoPassport.kix
;
;Add to your logonscript.
;
if KEYEXIST("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\passport.com")=0
ADDKEY("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\passport.com")
endif
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\passport.com","*","4","REG_DWORD")

Give it a try. I ran it and was no longer able to open Hotmail. [Smile]

Top
#24492 - 2002-07-05 10:07 PM Re: Hotmail Killer
badboii Offline
Fresh Scripter

Registered: 2002-03-07
Posts: 32
Loc: Seattle, WA
Chris,

Thanks for the great ideas...I like the nopassport.com but these guys are tricky....using your nopassport.kix users can still get into hotmail by going to http://www.msn.com then clicking on the hotmail link...going this round-about way lets users in. If I want to block that way I have to restrict msn.com all together.

Ok would this be possible? If I wrote the script in Kix using the AutoItX component would it be possible to call the hotmail killer from the login script(using shell/run) and have it loop using wkix32?

Thanks again!!!
_________________________
========================== Brian Zamora Computer Technician brian_zamora@hotmail.com ==========================

Top
#24493 - 2002-07-05 10:23 PM Re: Hotmail Killer
badboii Offline
Fresh Scripter

Registered: 2002-03-07
Posts: 32
Loc: Seattle, WA
Chris,

I spoke too soon....apparently the nopassport.kix script will not work if you are already signed into passport.com....so I just killed all the cookies on the machine.....then the script will always work [Wink]

Thanks again!!!!
_________________________
========================== Brian Zamora Computer Technician brian_zamora@hotmail.com ==========================

Top
#24494 - 2002-07-05 10:26 PM Re: Hotmail Killer
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
It doesn't have anything to do with cookies, but rather open instances of Internet Explorer. All instances of IExplore had to be closed for it to work immediately. It works with a IE window open, but you have to close all IE windows first, then start a new one to be "restricted."

If run from your logon script, you won't have this problem.

Hey, do you have MSN Messenger installed? I wonder if it blocks users from logging into it as well?

[ 05 July 2002, 22:30: Message edited by: Chris S. ]

Top
#24495 - 2002-07-05 10:34 PM Re: Hotmail Killer
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Just tried MSN Messenger. Doesn't affect it. [Frown] Oh, well. Still, works great for Hotmail, though. [Wink]
Top
#24496 - 2002-07-06 09:31 AM Re: Hotmail Killer
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Restricted Sites are also talked about at at - http://www.winguides.com/registry/display.php/1013/

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.061 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org