[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to make PC auto power on programatically

Posted on 2004-11-22
18
Medium Priority
?
1,137 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:DumDumBlaster
  • 4
  • 2
  • 2
  • +5
16 Comments
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 12655857
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
 
LVL 11

Expert Comment

by:Louis01
ID: 12664142
Buy a programmable wallplug.
0
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 12680032
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:Louis01
ID: 12680060
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
 

Author Comment

by:DumDumBlaster
ID: 12682437
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
 
LVL 1

Expert Comment

by:dragonfire123
ID: 12729928
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
 

Author Comment

by:DumDumBlaster
ID: 12885510
Well none of that helps me do what I want. What should I do? Do I still need to award the points?
0
 

Expert Comment

by:Angelzois
ID: 13460584
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
 

Expert Comment

by:Angelzois
ID: 13460589
MAC Address of the lan of the computer you want to wake up.
0
 
LVL 1

Expert Comment

by:dragonfire123
ID: 13461514
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
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13531183
Set wObj = CreateObject("ActiveXperts.WOL")

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

0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13531184
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
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13531209
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
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13531221
I assume you need some kind of .WOL file
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 14471283
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
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 14501761
PAQed with points (250) refunded

DarthMod
Community Support Moderator
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month20 days, 8 hours left to enroll

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question