Aegil
asked on
IIS Wake On Lan Form
Hey,
I found some code on a website for IIS based Wake on Lan.
http://www.depicus.com/wake-on-lan/wake-on-lan-asp.aspx
What I'm looking for basically. Is someway to set it up so that I can have multiple computers prestored in the page OR a sql database, and all the user sees is a drop down box with a list of computer names in Real Name sense, Ie Server1, Client1 etc so they can select that, press a button and it will run the scripts and wake up the selected computer.
Any help appreciated.
Regards
I found some code on a website for IIS based Wake on Lan.
http://www.depicus.com/wake-on-lan/wake-on-lan-asp.aspx
What I'm looking for basically. Is someway to set it up so that I can have multiple computers prestored in the page OR a sql database, and all the user sees is a drop down box with a list of computer names in Real Name sense, Ie Server1, Client1 etc so they can select that, press a button and it will run the scripts and wake up the selected computer.
Any help appreciated.
Regards
Static Code:
<%
set WakeOnLan = server.createobject("DigitalWol.Wol")
WakeOnLan.TheMacAddress('009027a322fc')
WakeOnLan.TheIpNumber('217.204.255.61')
WakeOnLan.TheSubnetMask('255.255.255.240')
WakeOnLan.ThePortNumber('8900')
WakeOnLan.WakeMeUp
%>
Form Code:
<form method="post" action="bottom.asp" target="bottom">
<p align="justify" style="margin-left: 10">This is where you would enter the Mac Address.</p>
<input type="text" name="MacAddress" size="20" value="009027a322fc">
<input type="text" name="IpNumber" size="20" value="195.188.159.20">
<input type="text" name="SubnetMask" size="20" value="255.255.255.0">
<input type="submit" value="Send Magic Packet" name="thebutton" class="button">
</form>
<%
if Request.Form("MacAddress") <> "" then
set WakeOnLan = server.createobject("DigitalWol.Wol")
WakeOnLan.TheMacAddress(Request.Form("MacAddress"))
WakeOnLan.TheIpNumber(Request.Form("IpNumber"))
WakeOnLan.TheSubnetMask(Request.Form("SubnetMask"))
WakeOnLan.ThePortNumber(Request.Form("PortNumber"))
WakeOnLan.WakeMeUp
end if
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
take a look at poweronmypc.com