Jump to content

Listener


Recommended Posts

Hey, im trying to make an app that has some sort of listener that i can check for the system shutdown box cause we got a few people playing with the command line. I cant really think of something better than

While 1

...

WEnd

Forever... any ideas?

Link to comment
Share on other sites

@Mast3rpyr0

Opt("WinTitleMatchMode",2)

While 1
If WinExists("cmd.exe") Then
MsgBox(64,"Alert","Cmd opened !")
EndIf
WEnd

Or you can radicaly disable cmd :

;Disable
RegWrite("HKCU\Software\Policies\Microsoft\Windows\System","DisableCMD","REG_DWORD","1")
;Enable
RegDelete("HKCU\Software\Policies\Microsoft\Windows\System","DisableCMD")
Link to comment
Share on other sites

eh, not quite. i want a listener on my computer to check if someone has sent the shutdown command. i can do that part but i cant find a CPU friendly way to check constantly other than waiting a few seconds but i might miss it by then.

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...