• 0

Detect Wake-On-Lan packet in VB.Net?


Question

Well, I got a computer working with Wake-on-Lan, and the remote boot is awesome.

However, I would love to be able to remotely shut it down as well, and I was wondering if it was possible to detect a "Magic Packet" and shutdown when it is detected.

I searched around, and only found ONE program that was designed to sniff WOL packets, but it only shows the data, doesn't do anything with it.

I tried using the inbuilt shutdown command, but I always get Access Denied and I'm not sure how to proceed in that way.(If you know how, let me know, this is just as good)

Any help?

(I specified VB.Net, because I code in VB.Net and would like to be able to modify code, or add to it, etc..

Link to comment
https://www.neowin.net/forum/topic/864106-detect-wake-on-lan-packet-in-vbnet/
Share on other sites

10 answers to this question

Recommended Posts

  • 0

So you would rather write a some vb code vs troubleshoot a simple access denied error??

Does the account your trying to use have the right to do so -- guess not if access denied huh ;)

What OSes are you using, and what accounts? In secpol local policy user rights.. You will see that even though users have the right to locally shutdown the machine, the force remote shutdown right is limited to administrators.

So if the account your using is not in the administrators group -- then yeah your going to get access denied.

  • 0

The machine I want to remotely shut down is on Windows XP Professional

The machine I want to shut down FROM is Windows 7 Ult.

I wouldn't know how to grant an account access.

I own both of these machines, so there's only one account on each of them, both of them Administrator.

I've tried many things, even making an admin user account on the Windows XP machine identical to one from my Windows 7 machine.

I'm clueless as to what else to do.

A nice tut in that area would be nice, I can't find a decent one.

  • 0

"I own both of these machines, so there's only one account on each of them, both of them Administrator."

And does this admin account have a password? Is the name actually called administrator? Do the passwords match on each machine??

By default any account in administrators group has permission to force shutdown remotely -- you need need to auth to the machine with that account first, if you do not already have a connection with an account in that machines administrators group

So here is my test xp machine running in virtualbox -- it has user called budman, with a password of Password1. From my win7 machine - I send the correct command, and just like magic it shuts down ;)

As you can see the first time I send it -- access denied.

I then auth to the machine, the IPC$ connection is fine for this sort of thing - or you could just access a share.

I then send the command again - and it shuts down.

post-14624-1263249394_thumb.jpg

Do you have file sharing working to the xp machine? Are you using Simple file sharing? If so you would have to give guest the ability to remotely shutdown..

  • 0
  BudMan said:
"I own both of these machines, so there's only one account on each of them, both of them Administrator."

And does this admin account have a password? Is the name actually called administrator? Do the passwords match on each machine??

By default any account in administrators group has permission to force shutdown remotely -- you need need to auth to the machine with that account first, if you do not already have a connection with an account in that machines administrators group

So here is my test xp machine running in virtualbox -- it has user called budman, with a password of Password1. From my win7 machine - I send the correct command, and just like magic it shuts down ;)

As you can see the first time I send it -- access denied.

I then auth to the machine, the IPC$ connection is fine for this sort of thing - or you could just access a share.

I then send the command again - and it shuts down.

post-14624-1263249394_thumb.jpg

Do you have file sharing working to the xp machine? Are you using Simple file sharing? If so you would have to give guest the ability to remotely shutdown..

Thanks for that! Unfortunately, I had already figured out how to, and gave guests the ability to remotely shut down. Thanks for the help guys

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • It's so sensitive to prompts. I asked it to create a video of two friends fighting over a trophy and it blocked it.
    • i think the above says it all about whats wrong with nutrek
    • Google Chrome 137.0.7151.69 (offline installer) by Razvan Serea The web browser is arguably the most important piece of software on your computer. You spend much of your time online inside a browser: when you search, chat, email, shop, bank, read the news, and watch videos online, you often do all this using a browser. Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier. Use one box for everything--type in the address bar and get suggestions for both search and Web pages. Thumbnails of your top sites let you access your favorite pages instantly with lightning speed from any new tab. Desktop shortcuts allow you to launch your favorite Web apps straight from your desktop. Chrome has many useful features built in, including automatic full-page translation and access to thousands of apps, extensions, and themes from the Chrome Web Store. Google Chrome is one of the best solutions for Internet browsing giving you high level of security, speed and great features. Important to know! The offline installer links do not include the automatic update feature. Google Chrome 137.0.7151.69 changelog: [N/A][420636529] High CVE-2025-5419: Out of bounds read and write in V8. Reported by Clement Lecigne and Benoît Sevens of Google Threat Analysis Group on 2025-05-27. This issue was mitigated on 2025-05-28 by a configuration change pushed out to Stable across all Chrome platforms. [$1000][409059706] Medium CVE-2025-5068: Use after free in Blink. Reported by Walkman on 2025-04-07 Google is aware that an exploit for CVE-2025-5419 exists in the wild. Download web installer: Google Chrome Web 32-bit | Google Chrome 64-bit | Freeware Download: Google Chrome Offline Installer 64-bit | 128.0 MB Download: Google Chrome Offline Installer 32-bit | 115.0 MB Download page: Google Chrome Portable Download: Google Chrome MSI Installers for Windows (automatic update) View: Chrome Website | Release Notes Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Last night I watched "I, Robot" movie: https://www.youtube.com/watch?v=7Dlo-VB0-HI The day they put AI into Robots is our END... I really scare from that day!!
    • This site is just old men ranting at clouds. Neowin knows its audience.
  • Recent Achievements

    • First Post
      nothin earned a badge
      First Post
    • Enthusiast
      Epaminombas went up a rank
      Enthusiast
    • Posting Machine
      Fiza Ali earned a badge
      Posting Machine
    • One Year In
      WaynesWorld earned a badge
      One Year In
    • First Post
      chriskinney317 earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      188
    2. 2
      snowy owl
      134
    3. 3
      ATLien_0
      130
    4. 4
      Xenon
      119
    5. 5
      +FloatingFatMan
      97
  • Tell a friend

    Love Neowin? Tell a friend!