CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1

    shutdown the machine

    Heres a question for ya...

    Could someone help me out with a way to initiate a shutdown and logoff via VB.NET?

    I had an idea for an app (for my semester project in VB programming) for a sort of control center. It would be something that would run in the background, and when you got ready to quit, you would open it, and that would initiate either a shutdown or log the user out, depending on what the user selects...

    Of course this is not all it would do, I want to get it to the point where perhaps it can be used to open a users favorite apps, keep track of documents, etc. It would basically be taking the favorites, shutdown/logoff, Programs, and My Documents features and putting them all in one application, kinda like a dashboard or control center. May be useful one day on an office network or something... but for now, its an idea I have been tossing around for my final project that will come due in a few months.

    So, any ideas on how to issue system shutdown and logoff commands via VB.NET?

    I can find ways of doing it on a Unix/Linux system, but I have no idea how such things are handled in Windows.

    Cheers,
    Jeff

  2. #2
    Join Date
    Sep 2001
    Location
    Montreal Canada
    Posts
    1,080

    Re: shutdown the machine

    I can give you a hint, because I'm not sure how you can do this in .net but calling shutdown.exe from the command line prompt should work.
    Nicolas Bohemier

  3. #3

    Re: shutdown the machine

    Thanks... I am at work right now so I cant really try it, but I will look into that this evening. I am not a windows guy, and I am really quite unfamiliar with its inner workings... my indepth windows knowledge stopped somewhere around Win98SE/Win2K... I am doing my programming on XP, and it is rather unfamiliar territory.

    But either way, thanks for the hint... I will see what I can do with that.

    Cheers
    Jeff

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

Featured