How to make PC auto power on programatically

My old Dell Inspiron 4000 has an "auto on" mode in the BIOS, which is quite convenient. By setting a time and enabling it, you can have your computer start up every morning, say, at 7am. It starts from cold, not from sleep or hibernate, but really from completely shut down to power on and boot of windows.

Can I do that programatically with VB or API calls? Using a software that would basically set the "auto-on" time and shut down computer.

I want to stress that I'm not looking for a solution to wake from standby, which I know how already, but to really power on from a cold shut down.

Thanks
DumDumBlasterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jimbobmcgeeCommented:
I don't think you can do this.  When a typical machine is 'off', there is actually a small amount of power running through it from the PSU.  This is so the BIOS can acknowledge the 'soft' Power-On button and start up systems accordingly.  

I imagine your old Inspiron also channelled that power to a small BIOS program that polled the system clock and initiated a power on command.

Unless you're pretty adept at BIOS programming/EEPROM flashing/whatever else they do in mobo labs, you're probably out of luck.

If you have a Wake-On-LAN mobo/NIC, you may be able to find a clock-style device that could plug into your Ethernet port...

HTH

J.
0
Louis01Commented:
Buy a programmable wallplug.
0
jimbobmcgeeCommented:
A programmable wallplug is all very well but you still need to press the 'soft' Power-On button (unless it's a really old machine, with a 'hard' switch).  

You could always jump the power-on button, of course...

J.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Louis01Commented:
True - I'm sure any electronics shop would be able to modify / bypass the switch to stay on.
Only problem left might be the waranty on the PC.
0
DumDumBlasterAuthor Commented:
Well, this doesn't really help me. I needed to do it programmatically, in a software. I'm not gonna tell my users: go make yourself a bypass switch. ;-)

Thanks for your efforts guys but I guess the only answer to my question is that there is no answer...

0
dragonfire123Commented:
Well, technically, you can, but not without knowing 1:  the BIOS code, including how you would either interface to it, or re-write it to include this feature, but this code is usually very proprietary, and difficult to find.  If you're fortunate enough to have an Integrated Circuit Emulator(ICE) for that particular micro, the correct version of code, (And a whole bunch of time and patience) you could do it.

However, the easiest way is probably to come up with a hardware solution.  (i.e., put a programmable bypass switch in between the power switch and the MB, then hook a serial-enabled interface board to that, connecting the serial interface to the PC's serial bus (or adapter, if you prefer) which you could then write software against to program the timing, wake_on_ping, wake_on_<<Some event>>, etc.  You'd probably have to power the device seperate from the PC, though.

Just remember,  What you're trying to do is cool, but very non-trivial.   If you figure it out,  be sure to let me know.  It sounds very kewl.

Good Luck!
0
DumDumBlasterAuthor Commented:
Well none of that helps me do what I want. What should I do? Do I still need to award the points?
0
AngelzoisCommented:
i have found this code for wake up on lan

Public Sub wake_up()
Dim data As String
Dim i As Integer
       
       data = "FFFFFFFFFFFF"
        For i = 1 To 16
        data = data & Text1.Text    'Where Text1.text = MAC Address of you lan
        Next i
        data = data + hex2ascii(data)
        Winsock1.SendData (data)
End Sub

Public Function hex2ascii(ByVal hextext As String) As String
Dim y As Integer
Dim num As String
Dim Value As String
For y = 1 To Len(hextext)
    num = Mid(hextext, y, 2)
    Value = Value & Chr(Val("&h" & num))
    y = y + 1
Next y

hex2ascii = Value
End Function
0
AngelzoisCommented:
MAC Address of the lan of the computer you want to wake up.
0
dragonfire123Commented:
One thing to remember about what you're trrying to do here.  Windows is NOT the BIOS.  Like jimbob said in the first response, there's a small amount of current running through the PSU but that only drives the BIOS.  It does not drive the OS(Linux, Windows, etc.).  The power needs for the BIOS are tiny compared to what the full OS uses.  Since the OS isn't running, and there's no VB runtime engine available, VB, or the Win32 API won't help you.  If you're in hibernation, that's different, but if you're at a full and complete machine stop, only part of the BIOS is acutally running.  The OS is not.  For this reason alone, I again suggest that a hardware solution is abosultely the easiest way to do this.  Any BIOS code you'll write will probably be done in assembler, or C.  DumDumBlaster, have you made any progress on what you're trying to do?  Any luck?  
0
nffvrxqgrcfqvvcCommented:
Set wObj = CreateObject("ActiveXperts.WOL")

  wObj.WakeUp "00-10-4B-BA-7A-51"
  WScript.Echo "WakeUp: result = " & wObj.LastError

0
nffvrxqgrcfqvvcCommented:
Module WakeOnLanDemo
    Sub Main()
      Dim objWol As ASOCKETLib.WOLClass = New ASOCKETLib.WOL()
      Dim objConstants As Constants = New Constants()
      objWol.WakeUp("00-10-4B-BA-7A-51")
      Console.WriteLine( "Result: " & objWol.LastError.ToString() )
    End Sub
  End Module
0
nffvrxqgrcfqvvcCommented:
FIRST ONE IS VB C# SECOND IS VB.NET

This is VBSCRIPT



Set wObj = CreateObject("ActiveXperts.WOL")

wObj.WakeUp "00-10-4B-BA-7A-51"
WScript.Echo "WakeUp: result = " & wObj.LastError
If( wObj.LastError <> 0 ) Then
  WScript.Echo "Error " & wObj.LastError & ": " & wObj.GetErrorDescription( wObj.LastError )
End If

0
nffvrxqgrcfqvvcCommented:
I assume you need some kind of .WOL file
0
GPrentice00Commented:
WOL-technology would be a programming solution implimented on a different computer able to access that target computer, not the kind of programming-of-self solution anticipated.  "Can be done by really getting into the bios programming" is only valid responses, but the WOL solutions here are good ideas for alternative approaches.
0
DarthModCommented:
PAQed with points (250) refunded

DarthMod
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.