Friday, February 20, 2009

Enabling Firewall Logging in Vista for troubleshooting purposes

The idea here is if you are having some kind of issue on your home network and you want to see if you are having a firewall issue, enabling the firewall logging of dropped packets can help with troubleshooting. Here is how to enable logging for dropped packets.

Enabling firewall logging in Windows Vista

With Control Panel in Classic View

Go To Start>Control Panel>Administrative Tools>Windows Firewall with Advanced Security

On the right click Properties

Click Private Profile Tab

Under Logging Click Customize button

Next to ‘Log dropped packets:’ do the pulldown and select Yes.

Click OK

If you want to log for Domain (not necessary unless your system is in a domain) or if you want to log for Public, click the tabs and repeat the steps above to enable logging for dropped packets.

Click OK

Close the Windows Firewall with Advanced Security window.

Now if your firewall blocks something on your home network you should be able to see it in the log.

To check the log open this file:
C:\Windows\system32\LogFiles\Firewall\pfirewall.log

Thursday, February 05, 2009

Dealing with 'invalid' filenames in Windows ("Cannot read from the source file or disk")

Occassionaly I run into this issue. A person has copied over a file created by a Mac onto a Windows system, due to illegal or invalid naming, the file cannot be deleted or read.

Another issue might be someone saved something and the path was too deep. Now the data is problematic - it cannot be copied from the system, deleted, renamed, whatever.

I learned something really cool today thanks to another blogger (http://blog.dotsmart.net).

Please read this post:
http://blog.dotsmart.net/2008/06/12/solved-cannot-read-from-the-source-file-or-disk/

I don't want to copy his work but I will say that you can get Windows to ignore the invalid elements by prefixing paths with \\?
For example: "\\?\C:\Documents and Settings\user\filewithdotatend."

This allows commands like C:\>ren "\\?\C:\Documents and Settings\user\filewithdotatend." "filenamewithoutdot"
Now the file is usable, deletable, whatever.

This is so cool. I had no idea. Thanks to Duncan Smart’s Weblog !

New beginner's guide to PowerShell on my GitHub page

 I created a beginner's guide to PowerShell here: https://github.com/aamjohns/Powershell_Guide/blob/main/README.md I hope it helps someo...