Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Code:
Selected Language:
Show Linenumbers:
Short link for Twitter:
HTML:

HTML view:

Copy Source | Copy HTML
  1. option explicit
  2.  
  3. dim osObj, osColl
  4. const nLogOff= 0
  5. const nReboot=2
  6. const nForceLogOff=4
  7. const nForceReboot=6
  8. const nPowerDown=8
  9. const nForcePowerDown=12
  10.  
  11. Set osColl = GetObject("winmgmts:{(Shutdown)}").ExecQuery("Select * from Win32_OperatingSystem")
  12.  
  13. For Each osObj in osColl
  14.     osObj.Win32Shutdown(nForcePowerDown)
  15. Next

Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2010
Some API could be found at http://s-c.me/WS/HighLight.asmx