Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WakeUP management
#1
I successfully use for long time my simple solution to wake up computers in the office from home, when i need to administrate them.
qm ist listening on the server with qm net.
I just send the name of the computer and the function on the server has all the mac addresses needed.
But this is 'hardcoded' and not convenient to maintain.

I tend use an excel file where i manage pc-name and mac addresses.

What do you suggest?

Thanks.

Function WakeUp
Code:
Copy      Help
function $whichPC
str target_mac go
str server1="192.168.2.250"
str wol="C:\wol.exe"
sel whichPC
,case "johanna pc"
,,target_mac="30-9C-23-80-C3-68"    
,case "david"
,,target_mac="44-37-E6-89-E3-0F"    
,case "marina"
,,target_mac="CC-52-AF-4B-47-3F"    
,case "office"
,,target_mac="40-2C-F4-EA-13-3F"            
,case "simon"
,,target_mac="00-21-CC-68-F9-BA"        
,case "datev"
,,target_mac="00-23-24-80-9D-EB"            
,case "licht"
,,target_mac="00-13-3B-0F-12-E6"        
,case "minh"
,,target_mac="00-21-CC-4A-1F-DA"        
,case "rodas"
,,target_mac="54-EE-75-40-0D-EC"            
,,
,case else
,,end


go.format("''%s'' ''%s''", target_mac server1)
run wol go
out go
pi
#2
Replace sel...end with
Code:
Copy      Help
ICsv k._create
k.FromFile("q:\test\WakeUp.csv")
int i=k.Find(whichPC 1); if(i<0) end
target_mac=k.Cell(i 1)

q:\test\WakeUp.csv
Code:
Copy      Help
johanna pc, 30-9C-23-80-C3-68
david, 44-37-E6-89-E3-0F
marina, CC-52-AF-4B-47-3F
office, 40-2C-F4-EA-13-3F
simon, 00-21-CC-68-F9-BA
datev, 00-23-24-80-9D-EB
licht, 00-13-3B-0F-12-E6
minh, 00-21-CC-4A-1F-DA
rodas, 54-EE-75-40-0D-EC
#3
Pretty cool.
Thanks!
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)