Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I wrote program to shutdown system automatically in PERL , while shutdown if we open any file the windows asked that the file will save or cancel , my aim is cancel button automatically clicked and shut the system

share|improve this question

1 Answer 1

Use the shutdown command - open up a cmd window and use shutdown /? to see help on it. When used by itself with no arguments, it will pop up a 30 second warning and then shut down the machine. It will ignore anything like dialogue boxes asking questions

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.