• 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.