where mac address is the unique address of the network card. To find the mac address of a card you can either open the computer and read the address on the sticker on the card or much easier is, if you are using TCP/IP, ping the machine from a dos prompt (ping [machine name or ip number] i.e. ping delphi or ping 10.43.43.43) then issue an arp command (arp -a) which will list the ip number and physical address of the card.
If the port number is not specified it will default to port 7
To run the batch file, say half an hour before everybody gets into work, use the AT command on a Windows NT computer.
The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command.
What does it look like
Price - Wake On Lan Command Line is free.
해당 자료는 Free 라는 멘트가 넘흐 와 닫는다 ㅎㅎ
실제 Flex에서 해당 작업을 처리 하기 위해서는 Flex NativeProcess를 사용 해야 한다.
//wakeonlan 실행
public function WakeOnLan(event:MouseEvent) : void {
if ( NativeProcess.isSupported ) { // 옵션에서 extendedDesktop 을 해줘야 사용할수 있다.
//get the directory
var wakeOnLan:NativeProcess;
var file:File = File.applicationDirectory;
file = file.resolvePath("WakeOnLan");
// point to the file
file = file.resolvePath("WolCmd.exe");
//define process startup information
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.workingDirectory = new File(File.applicationDirectory.nativePath + File.separator + "WakeOnLan");
var args:Vector. = new Vector.();
var macaddress:String = "001122334455"; //Macaddress
var ip:String = "192.168.0.1"; //Ip
var subnetMask:String = "255.255.255.0"; //SubNetMask
var port:String = "8080"; // Port
args.push(macaddress);
nativeProcessStartupInfo.arguments = args;
nativeProcessStartupInfo.executable = file;
wakeOnLan = new NativeProcess();
wakeOnLan.addEventListener( NativeProcessExitEvent.EXIT, onExit);
try {
wakeOnLan.start( nativeProcessStartupInfo );
} catch ( error : IllegalOperationError ) {
Alert.show( "Illegal Operation: " + error.toString(),"확인",4,this);
} catch ( error : ArgumentError ) {
Alert.show( "Argument Error: " + error.toString(),"확인",4,this);
} catch ( error : Error ) {
Alert.show( "Error: " + error.toString(),"확인",4,this);
}
} else {
Alert.show( "네이티브 프로세스 지원안됨.","확인",4,this);
}
}
public function onExit(e:Event):void {
trace("WakeonLan 수행");
}