Site Statistics
 
Threads: 3,993
Posts: 17,451
Members: 2,979
Users Online: 19
Newest Member: Jayne


Go Back   PC101 > Windows Operating System Forums > Windows XP and other Window Versions

Windows XP and other Window Versions In an effort to keep things easier to find this is the place to post questions directly related to NON-Vista Window operating systems, programs, or components.


Reply
 
LinkBack Thread Tools Display Modes
Old 05-06-2006, 12:56 PM   #1
Freshman
 
Join Date: Mar 2006
Location: sengkang
Posts: 7
Rep Power: 0 Wels is on a distinguished road
Send a message via AIM to Wels Send a message via MSN to Wels
Is there such script?

Help! is there such script that auto shut down pc by 1930? by this time it will auto shut down the pc.

Hw do i do it? Help!
Wels is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-06-2006, 06:47 PM   #2
Professor
 
Join Date: Jul 2005
Posts: 2,208
Rep Power: 6 Will.Spencer is on a distinguished road
You can do that with the `shutdown` command in combination with the `at` command:

Code:
at:
The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command.

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\\computername     Specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted.

id                 Is an identification number assigned to a scheduled command.

/delete            Cancels a scheduled command. If id is omitted, all the scheduled commands on the computer are canceled.

/yes               Used with cancel all jobs command when no further confirmation is desired.

time               Specifies the time when command is to run.

/interactive       Allows the job to interact with the desktop of the user who is logged on at the time the job runs.

/every:date[,...]  Runs the command on each specified day(s) of the week or month. If date is omitted, the current day of the month is assumed.

/next:date[,...]   Runs the specified command on the next occurrence of the day (for example, next Thursday).  If date is omitted, the current day of the month is assumed.

"command"          Is the Windows NT command, or batch program to be run.

Code:
shutdown:
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]

No args                 Display this message (same as -?)
-i                      Display GUI interface, must be the first option
-l                      Log off (cannot be used with -m option)
-s                      Shutdown the computer
-r                      Shutdown and restart the computer
-a                      Abort a system shutdown
-m \\computername       Remote computer to shutdown/restart/abort
-t xx                   Set timeout for shutdown to xx seconds
-c "comment"            Shutdown comment (maximum of 127 characters)
-f                      Forces running applications to close without warning
-d [u][p]:xx:yy         The reason code for the shutdown
                        u is the user code
                        p is a planned shutdown code
                        xx is the major reason code (positive integer less than 256)
                        yy is the minor reason code (positive integer less than 65536)
Will.Spencer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-07-2006, 10:14 AM   #3
Freshman
 
Join Date: Mar 2006
Location: sengkang
Posts: 7
Rep Power: 0 Wels is on a distinguished road
Send a message via AIM to Wels Send a message via MSN to Wels
Is there an example? I am still getting a blur about this and how to use it.
Wels is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-07-2006, 10:51 AM   #4
Professor
 
Join Date: Jul 2005
Posts: 2,208
Rep Power: 6 Will.Spencer is on a distinguished road
The proper syntax depends upon exactly what you want to do.

For example, here is a command that will shut your computer down every Sunday at 7:30:
Code:
C:\>at 7:30 /every:sunday shutdown -s
Added a new job with job ID = 1
Will.Spencer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-07-2006, 08:49 PM   #5
Freshman
 
Join Date: Mar 2006
Location: sengkang
Posts: 7
Rep Power: 0 Wels is on a distinguished road
Send a message via AIM to Wels Send a message via MSN to Wels
okok.. where do i put the script to C: Window? what if i wan it everyday to activate the script at 1730? the command will be? thanz..!
Wels is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2006, 12:05 AM   #6
Freshman
 
Join Date: Mar 2006
Location: sengkang
Posts: 7
Rep Power: 0 Wels is on a distinguished road
Send a message via AIM to Wels Send a message via MSN to Wels
nvm.. i get it.. thanzzz!
Wels is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2006, 09:00 PM   #7
Freshman
 
Join Date: Mar 2006
Location: sengkang
Posts: 7
Rep Power: 0 Wels is on a distinguished road
Send a message via AIM to Wels Send a message via MSN to Wels
1 more thing to ask... let say if the computer after 5hr when nobody touch it it will auto shut down any script?
Wels is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-09-2006, 12:43 AM   #8
Professor
 
Join Date: Jul 2005
Posts: 2,208
Rep Power: 6 Will.Spencer is on a distinguished road
Inactivity timers are more complex to create.

I do not know of a free tool in that space.

There are quite a few commercial programs which do this, such as AutoShutdown or Shutdown Vaccine.
Will.Spencer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
What script can compete with this mutant software? gemini181 Software 2 12-05-2006 05:08 AM
Ringtone Script BILZ Gadgets and Gizmos 0 08-22-2006 09:37 PM
Internet Script Error dking1612 PC & Tech Related News, Events and More! 4 08-07-2006 02:58 AM
Ticker Script parag2006 Web Design and Development 3 06-19-2006 01:56 AM
free search script parag2006 Web Design and Development 2 06-18-2006 07:19 AM



All times are GMT -5. The time now is 01:54 PM.

Powered by vBulletin Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC5