Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

help with my iexplorer guard script..

$
0
0

Hey, so I have created a script that upon detection of iexplore.exe process (internet explorer) it will ask for an input password:

If ProcessExists ("iexplore.exe") Then         WinWait ("[CLASS:IEFrame]")         WinSetState ("[CLASS:IEFrame]", "", @SW_HIDE )         Local $pw = InputBox ("Passord", "Admin passord:", "", "*")             If $pw = $passwordaccept Then                 WinSetState ("[CLASS:IEFrame]", "", @SW_SHOW )                 ProcessWaitClose ("iexplore.exe")             Else                 WinSetState ("[CLASS:IEFrame]", "", @SW_SHOW )                 ProcessClose ("iexplore.exe")                 MsgBox(0, "Feil passord!", "Det er forbudt å surfe med denne maskinen.")                 sleep (100)             EndIf     EndIf

As you can see, there is a slight logical flaw with it. Whenever user attempts to open a process the window will be hidden and a password will be requested, however since the script pauses at inputbox the user can just open internet explorer again and ultimately bypass the script. Is it possible to have the inputbox on screen, but while it´s there the script doesn´t pause and keep searching for iexplore.exe windows?

 

 

I am most certain there is an easier way to accomplish this, but I don´t know of any. Care to help out? Thanks.


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>