Code to turn off monitor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #16
    Originally posted by code green
    The exact same question was asked by the same poster 8 months ago.
    How odd that the OP gets the same school project every year


    And this


    And this


    Mirainc would not take no for an answer then
    You gotta respect his persistence ;)

    Comment

    • Ciary
      Recognized Expert New Member
      • Apr 2009
      • 247

      #17
      i think it would be highly insecure if something like this would be possible.thnk about what would happen if someone opens a page and suddenly his pc shuts down. also, if it was possible and you would link to it using an ajax request, it wont be your pc that shuts down but the webserver which hosts the ajax.

      if this would be possible without asking the user a permission to do it it would be great to hack into and shutdown webservers. i think, if you want to do it, you'll need an activeX control.

      Comment

      • tatzagata
        New Member
        • Dec 2015
        • 1

        #18
        I have this vbscript code which helps to configure the time(in minutes) to turn off monitor.

        Set WSHShell = CreateObject("W Script.Shell")

        WSHShell.Run "CMD /c POWERCFG -X monitor-timeout-ac 1"

        Set WSHShell = Nothing

        Comment

        Working...