Results 1 to 4 of 4

Thread: HELP Shutting down windows...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2005

    HELP Shutting down windows...

    I would like to find a way to shut down windows(computer) without calling an API or using the command prompt shutdown. I want to do it in .NET... perhaps with WMI? Any help would be greatly appreciated!


  2. #2 Kasracer's Avatar
    Join Date
    Jul 2003
    USA, Maryland

    Re: HELP Shutting down windows...

    VB Code:
    1. System.Diagnostics.Process.Start("shutdown", "-t 0")

    Only way I can think to do it (I didn't test that code, it may need adjusting but you get the idea). - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  3. #3
    Addicted Member
    Join Date
    Sep 2004

    Re: HELP Shutting down windows...

    Or, if you can even do it just at a command promp (or in a batch file) as

    shutdown -t 0

    if you need to make sure you force running application to close you can use

    sutdown -f -t 0

    or if you want to do a reboot you can use

    shutdown -f -r -t 0

    just go to the command prompt and enter

    shutdown /?

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Sydney, Australia

    Re: HELP Shutting down windows...

    Can I ask why?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width