Prevent shutdown of computer

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts Page 1 of 1
Contributors
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Prevent shutdown of computer
clanc789
Hey Coders,

I've got another program. I want to abort/cancel the shutdown of Windows during the time my program is running. I've tried:
Code: Select all
timer1.interval = 1
timer1.enable = true

timer 1 code:
if "shutdown" is running (the procces) then
shell("shutdown -a")
end if
That wont work (this is just what I did, if you copy & paste it, it wont work), do you have solution?
Practice makes perfect!

VIP since: 6-10-2011
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Prevent shutdown of computer
Dummy1912
Hello clanc,

see if i understand it correct.

you are working with timer?
after during the timer you want to abort the shutdown.

is there a display to show how much time you have before shutdown?
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Codex
Coding God
Coding God
Posts: 2028
Joined: Wed Mar 31, 2010 5:50 pm

Re: Prevent shutdown of computer
Codex
Dummy1912 wrote:
Hello clanc,

see if i understand it correct.

you are working with timer?
after during the timer you want to abort the shutdown.

is there a display to show how much time you have before shutdown?
He wants his application to detect if someone is trying to shutdown his pc and then stop it using command line.
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: Prevent shutdown of computer
clanc789
Codex wrote:
Dummy1912 wrote:
Hello clanc,

see if i understand it correct.

you are working with timer?
after during the timer you want to abort the shutdown.

is there a display to show how much time you have before shutdown?
He wants his application to detect if someone is trying to shutdown his pc and then stop it using command line.
Yes Codex, you are totally right, but does someone have a solution on how to do this?
Practice makes perfect!

VIP since: 6-10-2011
4 posts Page 1 of 1
Return to “Tutorial Requests”