Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can windows 2000 automatically shutdow? 3

Status
Not open for further replies.

milkman

Programmer
Oct 18, 2000
37
US
I work in an open lab at school, and I wanted to know if there is any way for the computers to automatically shutdown at a certain time. Our lab closes at midnight and I want the computers to automatically shutdown at midnight. Does anyone have any suggestons?
 
Yeah, just write a little program to send it a shutdown command. I've done it before...I'll write a simple program for you if you'd like. I think it can be done in win 2k, I'll try.
 
Alright, I can do it. It took a few tries...All I could do at first was either logout, reboot, or shut it down but not power off. I finally figured out how to power off. Anyway, the program is written in Visual Basic if thats ok. I need to know some specifics. Things like do you want the program to have a set time, to be controled remotely, or do you just want the code and you finish it to your specifications.

Email me at sw_freak@hotmail.com or if you have aim my screen name is Your Pet Nerd.
 
ForeverCode, since you seem to know about this I have another question for you.
the dos command to shut a system down is "shutdown /r 3"(3 secs).
Is there a way to include this in a batch file to close a system at say..... midnight each night.
Thanks
 
forevercode, if you can specify that the CPU shutdown exactly at 10PM. Thanks Forevercode.
 
crwpulsar, I think there is a way, but I haven't a clue how to do it...sorry.

I finished the program, it will run in the background and when the system clock is at 10:00 PM the computer will shut down. You could either just put the program in the startup folder, or add a regisry key to automatically start it up every time the computer boots.

You can download it at my site:


The source:


Let me know if it worked.
 
crwpulsar - doesn't the AT command give you what you want?
 
Forevercode, I tried your code out last night on my test machine. The code did as you say exactly at 10:00 PM , but seemed like it got cought in a blue screen, but not the blue screen of death. Is there something I need to add to completely shutdown?

Thanks Forevercode.
 
Hmm...I don't know, it works fine on my Win 2k system. Does the blue screen say anything, or is it just blue?
 
ForeverCode you're the man when it comes to code, what you gave me worked out like you said it would. The blue screen went away, I put the file in my startup, but know I want to put the code in my registry files, but how can I do that? If you have time can you reply
 
Milkman: There is a freeware utility called Switch Off that does all you need (and more). I have used it for 6 months on servers and workstations, and it is GREAT.

Find it for download at
Here is the developer's overview:

Switch Off is a tiny easy-to-use tray-based system utility that can automatically perform various frequently used operations like shutdown or restart your computer, disconnect your current dialup connection, lock workstation, etc. It also provides fast access to this operations through system tray icon. Utility has fully customizeable Web interface, that allows you to initiate operations mentioned above remotely from any computer with web browser installed. Web interface includes WAP support, so you can control your computer from mobile phone. This utility is intended to be used by either novice or professional user, because of its intuitive interface and professional features.

Hope that helps you!
 
I was just at the MS site and saw the command for shutting down W2K. It was a shutdown -* type format which cught my eye becaue it was alot like Unix. Saving this in a batch file, then adding an AT job should work. I'll have to go look for it and give it a try. It sure beats another program constanly running in the systray!

Sean.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top