Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 11-19-2011, 09:55 PM   #1
Solid State Member
Join Date: Oct 2011
Posts: 17
Default Simple Shutdown Program

Good Readings every one...

i would like to create a batch file that the users can input how many hours before it will shut down. i cant understand the set command in the batch file please help me!!

lanche26 is offline   Reply With Quote
Old 11-20-2011, 08:17 AM   #2
Join Date: Oct 2004
Location: England
Posts: 6,224
Default Re: Simple Shutdown Program

Create a text file. In the text file type "shutdown -s" without the brackets around it.

Save it as sd.bat or shutdown.bat or whatever you want as long as the extension is ".bat".

Go to >Start>Control Panel (or whatever)
In control panel look for "Scheduled Tasks"

Open Scheduled Tasks and create a new task by going >File>New>Scheduled Task

Call it whatever you want

right click on the new task you created and select properties

in the box beside "run" select the ".bat" file you created wherever you saved it.

select the "schedule" tab and then select "daily" with a start time of yourtime

Also schedule it for every day (every 1 days)

Click "advanced" beside the yourtime start time

Then select the "time" radio button beside "until". Set it to go till your time

select the security tab and hit "add"

in the text box type your username and hit enter

select your username in the box above the add button and click the check box under "Allow" and beside "Full control" to give you all the privileges to change it.

click the "advanced" button underneath.

select the "Everyone" option which should be under (or over alphabetically) your username

Uncheck the box at the bottom of the window that talks about inheritance and choose the middle option when it bitches.

click "ok" and "ok"
IAntDemo is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 06:23 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0