Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 27-12-2008
Member
 
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?
Reply With Quote
  #2  
Old 27-12-2008
Member
 
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.
Reply With Quote
  #3  
Old 27-12-2008
Member
 
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?
Reply With Quote
  #4  
Old 27-12-2008
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to create a message for shutdown ?"
Thread Thread Starter Forum Replies Last Post
I get a CiceroUIWndFrame error message during shutdown Jagad Hardware Peripherals 5 05-04-2011 10:33 AM
create one click shutdown and restart menu harsh_maurya Windows Software 1 09-11-2010 07:42 PM
Create cd that Shutdown the Computer if used ramsun Tips & Tweaks 4 07-12-2009 11:17 PM
Why does this message appear on shutdown - McciAsyncEventMgrWnd? Nadeem MS Office Support 1 19-02-2009 02:11 AM
Error message at startup and shutdown Michael25 Operating Systems 2 23-09-2008 06:00 PM


All times are GMT +5.5. The time now is 06:52 PM.