Results 1 to 4 of 4

Thread: How to create a message for shutdown ?

  1. #1
    Join Date
    May 2008
    Posts
    351

    How to create a message for shutdown ?

    I would like to create a small program that allows me to turn off a networked PC.

    I have therefore set up a code in a notepad which allows me to perform this function: shutdown -m \\pc-name

    Everything works very well. But I'd like that before this function does, a window opens and asks to click OK to execute, or Cancel if I decide not to turn off the PC. Basically I want a message confirming the execution.

    Someone knows how to do that?

  2. #2
    Join Date
    May 2008
    Posts
    685

    Re: How to create a message for shutdown ?

    You need to do a small VBS coding to display a prompt before shutting off your computer. It is very easy, you just need to get information on:

    - Dialog boxes in VBS
    - The command execution system VBS

    and you can encode it in a dozen of lines.

  3. #3
    Join Date
    May 2008
    Posts
    351

    Re: How to create a message for shutdown ?

    may be but me and programming ...

    I can do only something like this:

    Display message "confirm?"

    if yes => run "shutdown-m \ \ ?..."
    if no => stop

    it is not so easy to do?

  4. #4
    Join Date
    May 2008
    Posts
    685

    Re: How to create a message for shutdown ?

    Code:
    Dim cmd 
    Set cmd = CreateObject ( "WScript.Shell") 
    Dim ok 
    ok = msgbox ( "Hello", vbYesNo) 
    If ok = vbYes Then 
    cmd. run "shutdown-m \ \ ?..." 
    end if
    Save this in a .vbs file with notepad, and start your coding.

Similar Threads

  1. I get a CiceroUIWndFrame error message during shutdown
    By Jagad in forum Hardware Peripherals
    Replies: 5
    Last Post: 05-04-2011, 10:33 AM
  2. create one click shutdown and restart menu
    By harsh_maurya in forum Windows Software
    Replies: 1
    Last Post: 09-11-2010, 07:42 PM
  3. Create cd that Shutdown the Computer if used
    By ramsun in forum Tips & Tweaks
    Replies: 4
    Last Post: 07-12-2009, 11:17 PM
  4. Replies: 1
    Last Post: 19-02-2009, 02:11 AM
  5. Error message at startup and shutdown
    By Michael25 in forum Operating Systems
    Replies: 2
    Last Post: 23-09-2008, 06:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,576,880.84195 seconds with 17 queries