
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2009 11:56 AM
i have edited the line
<td class="lijntje"><a href="javascript:runApp('wol.exe <%=replace(myrow("macaddress"),":","")%>','true');"><%=myrow("description")%></a> </td>
in it-compdetail.aspx to:
<td class="lijntje"><a href="javascript:runApp('\\\\path to your server\\share\\directory\\wakeup.cmd <%=replace(myrow("macaddress"),":","")%> <%=dscomputers.FieldValue("ip address", nothing)%>','true');"><%=myrow("description")%></a> </td>
This is my wakeup.cmd
@ECHO OFF
set MAC=%1
set IP=%2
for /f "Tokens=1,2,3 Delims=." %%a in ('echo %IP%') do set NET=%%a.%%b.%%c
if /i %NET%==10.10.10 goto REMOTE_1
if /i %NET%==10.10.11 goto REMOTE_2
goto LOKALNET
:REMOTE_1
echo.
echo.
echo Wake On LAN REMOTE_1 in LAN %NET%.0
echo.
echo.
echo poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
\\$YOUR SERVER$\$YOUR SHARE$\pstools\psexec \\$YOUR REMOTESERVER 1$ -c \\$YOUR SERVER$\$YOUR SHARE$\WakeOnLAN\poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
goto EOF
:REMOTE_2
echo.
echo.
echo Wake On LAN REMOTE_1 in LAN %NET%.0
echo.
echo.
echo poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
\\$YOUR SERVER$\$YOUR SHARE$\pstools\psexec \\$YOUR REMOTESERVER 2$ -c \\$YOUR SERVER$\$YOUR SHARE$\WakeOnLAN\poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
goto EOF
:LOKALNET
echo.
echo.
echo Wake On LAN in Lokal LAN %NET%.0
echo.
echo.
echo poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
\\$YOUR SERVER$\$YOUR SHARE$\WakeOnLAN\poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
goto EOF
:EOF
echo.
echo.
\\$YOUR SERVER$\$YOUR SHARE$\Resource_Kit\choice /n /c:e /t:e,3 close with 'E' or wait 3 Seconds.
the benefit of the tool poweroff is the wakup in mor than one subnet. ( wol.exe can only wakeup in the same subnet )
in my script i also can wakup clients at remote locations
you can find poweroff.exe here:
http://users.telenet.be/jbosman/applications.html
<td class="lijntje"><a href="javascript:runApp('wol.exe <%=replace(myrow("macaddress"),":","")%>','true');"><%=myrow("description")%></a> </td>
in it-compdetail.aspx to:
<td class="lijntje"><a href="javascript:runApp('\\\\path to your server\\share\\directory\\wakeup.cmd <%=replace(myrow("macaddress"),":","")%> <%=dscomputers.FieldValue("ip address", nothing)%>','true');"><%=myrow("description")%></a> </td>
This is my wakeup.cmd
@ECHO OFF
set MAC=%1
set IP=%2
for /f "Tokens=1,2,3 Delims=." %%a in ('echo %IP%') do set NET=%%a.%%b.%%c
if /i %NET%==10.10.10 goto REMOTE_1
if /i %NET%==10.10.11 goto REMOTE_2
goto LOKALNET
:REMOTE_1
echo.
echo.
echo Wake On LAN REMOTE_1 in LAN %NET%.0
echo.
echo.
echo poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
\\$YOUR SERVER$\$YOUR SHARE$\pstools\psexec \\$YOUR REMOTESERVER 1$ -c \\$YOUR SERVER$\$YOUR SHARE$\WakeOnLAN\poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
goto EOF
:REMOTE_2
echo.
echo.
echo Wake On LAN REMOTE_1 in LAN %NET%.0
echo.
echo.
echo poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
\\$YOUR SERVER$\$YOUR SHARE$\pstools\psexec \\$YOUR REMOTESERVER 2$ -c \\$YOUR SERVER$\$YOUR SHARE$\WakeOnLAN\poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
goto EOF
:LOKALNET
echo.
echo.
echo Wake On LAN in Lokal LAN %NET%.0
echo.
echo.
echo poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
\\$YOUR SERVER$\$YOUR SHARE$\WakeOnLAN\poweroff.exe wol -mac %1 -ip %2 -subnet 255.255.255.0
goto EOF
:EOF
echo.
echo.
\\$YOUR SERVER$\$YOUR SHARE$\Resource_Kit\choice /n /c:e /t:e,3 close with 'E' or wait 3 Seconds.
the benefit of the tool poweroff is the wakup in mor than one subnet. ( wol.exe can only wakeup in the same subnet )
in my script i also can wakup clients at remote locations
you can find poweroff.exe here:
http://users.telenet.be/jbosman/applications.html
Labels:
- Labels:
-
Custom Actions
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2023 12:57 PM
Hello everyone,
Due to the age of this post, it has been archived. Please feel free to start a new post if you wish to continue to discuss this topic.
Thank you for understanding.
