#138563 - 2005-04-23 07:01 AM
System suspend
|
OSD
Fresh Scripter
Registered: 2005-04-21
Posts: 9
|
I'm a rookie when it comes to scripting and/or programming, so I haven't been able to figure this out myself.
I want to close down all components on a system that cause noise. This means turning off the monitor, stopping the hard disks and slowing down the computer fan to minimum speed. Then I want to wake the system up and run an external batch file after a set amount of time.
Now I wonder if anyone has done anything similar before. Any tips or pointers? I tried searching the forum but found nothing of use(I do suck at searching forums, people always seem to think in different words than I[is the previous sentence even English?])
ANY help appreciated.
|
Top
|
|
|
|
#138564 - 2005-04-23 08:13 AM
Re: System suspend
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11625
Loc: CA
|
Hello OSD and welcome to the board.
Well not sure how much can really be done from a script level but perhaps you can start here and see how far you can go.
Windows Management Instrumentation - CIM_Controller
|
Top
|
|
|
|
#138566 - 2005-04-23 09:04 PM
Re: System suspend
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11625
Loc: CA
|
Except that our Security Admins for perimeter control have disabled WakeOnLan from passing through the routers.
|
Top
|
|
|
|
#138569 - 2005-04-24 04:08 AM
Re: System suspend
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Have you looked at SETSYSTEMSTATE, which gives you the ability to Hibernate, power off, etc. for a computer?
Thanks,
Kent
|
Top
|
|
|
|
#138571 - 2005-04-24 09:51 AM
Re: System suspend
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Probably.. Have not tried it.. What about the WOL "magic packet?"
Kent
|
Top
|
|
|
|
#138573 - 2005-04-25 04:29 PM
Re: System suspend
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
|
Top
|
|
|
|
#138574 - 2005-04-27 01:38 AM
Re: System suspend
|
OSD
Fresh Scripter
Registered: 2005-04-21
Posts: 9
|
Right, I can now suspend the system by using SETSYSTEMSTATE. The trouble is, I can't wake it up =)
Do I have to do this on BIOS level are can you guys think of anyway to wake up the system?
Also, I'll soon connect the box I'm trying to suspend/wake up to a LAN. Does this help?
|
Top
|
|
|
|
#138576 - 2005-04-28 04:05 PM
Re: System suspend
|
OSD
Fresh Scripter
Registered: 2005-04-21
Posts: 9
|
So how would I go about this? I have made the part that I want executed after the system is woken up, but what before that? Suspend the system, schedule a task(I could probably set the task to be the after-suspension batch file).
s there a way to schedule a task using command line or Kixtart?
|
Top
|
|
|
|
#138579 - 2005-04-28 08:12 PM
Re: System suspend
|
OSD
Fresh Scripter
Registered: 2005-04-21
Posts: 9
|
*deleted cause it didn't work*
Edited by OSD (2005-05-02 11:57 AM)
|
Top
|
|
|
|
#138580 - 2005-04-28 08:20 PM
Re: System suspend
|
OSD
Fresh Scripter
Registered: 2005-04-21
Posts: 9
|
The waalarm.bat uses CLAmp, a command line utility for Winamp http://membres.lycos.fr/clamp/
Here are the contents of that if anyone is interested. The CLAmp.exe is located in the same folder as the .bat file. The PING 1.1.1.1 parts are there for delay to allow the songs to finish. Again, I wouldn't have to clear the playlist everytime after a song finishes, but I just tend to things the slow way.
Code:
H:\Musa\CLamp.exe /START /EQSTATUS ON /PLCLEAR /PLADD "Air - Cherry Blossom Girl.mp3" /PLAY /VOLMAX
PING 1.1.1.1 -n 1 -w 230000 >NUL H:\Musa\CLamp.exe /PLCLEAR /PLADD Battle.mp3 /PLAY
PING 1.1.1.1 -n 1 -w 150000 >NUL H:\Musa\CLamp.exe /EQSET 32:32:32:32:32:32:32:25:25:28:0:1:0 /PLCLEAR /PLADD "Red hot chili peppers - Search and destroy.mp3" /PLAY
PING 1.1.1.1 -n 1 -w 220000 >NUL H:\Musa\CLamp.exe /EQSET 32:32:32:32:32:32:32:25:25:28:9:0:0 /QUIT
|
Top
|
|
|
|
#138582 - 2005-04-28 09:02 PM
Re: System suspend
|
OSD
Fresh Scripter
Registered: 2005-04-21
Posts: 9
|
errm, if we want to be nitpicky the script I just posted above doesn't work. =) It suspends the systems alright, but still it won't wake it up. I need to set "Wake the computer to run this task." from task properties, but I don't know how to.
There must be something in the jt.exe to do this, I just can't figure out how to incorporate it to the script. Chances are I'm going to switch my scripting language to BTEwin and see what I can do. If someone does manage this with kixtart, tell me too.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2366 anonymous users online.
|
|
|