Windows

How to clear DNS cache in various OS

There are a variety of reasons why (updated a DNS record, issues with resolver, etc) but sometimes a good diagnostic step is to clear out the dns cache.

Each operating system (and even versions / distributions in some cases) have a different method

OSX 10.10 > sudo discoveryutil udnsflushcaches

OSX 10.9 > dscacheutil -flushcache; sudo killall -HUP mDNSResponder

OSX 10.7 – 10.8 > sudo killall -HUP mDNSResponder

OSX 10.5 – 10.6 > sudo dscacheutil -flushcache

Windows > ipconfig /flushdns

Linux - There are many different distros and versions here, but one of the following should work > /etc/init.d/named restart

/etc/init.d/nscd restart

service nscd reload

sudo /etc/init.d/dnsmasq restart

service dnsmasq restart

How to delete an EFI partition in Windows

Just the other day I had to repartition an external drive that had an EFI partition on it. It took a few minutes to figure it out so I thought I’d leave this here for myself and anyone else that might stumble upon the post. Disclaimer of course is that please be sure on which disk and partition you are picking in the following steps so you don’t remove the wrong one and lose data.

Make sure the drive in question is connected and then:

Open a command prompt with elevated permission

Run diskpart

To see all of your disks, type list disk

To select the disk, select disk #

Then select the partition with select partition #

And the last command to run is delete partition override

Now you can close diskpart and the command prompt. The EFI partition is gone :)

Start the Windows Installer Service in Safe Mode with SafeMSI.exe

When a computer is in safe mode, the Windows Installer Service isn’t started. This can cause some issues as some malware can be removed easier through safe mode or maybe other issues in uninstalling a program force you to use an alternate method. However, if you just try to start the service in safe mode, it fails with an error message (Could not start the Windows Installer service on Local Computer. Error 1084: This service cannot be started in Safe Mode).

Enter SafeMSI.exe, a tiny (and portable) free app that starts up the Windows Installer Service for you. In reality, it’s simply running a registry tweak and starting the service but this makes it a lot easier than editing the registry & starting the service on your own.

You can download the program here

Fixing common Windows problems

Enable / Disable the Hidden Administrator account on Windows 7 or Vista

Microsoft Fix It Solution Center - It doesn’t get much easier than this: Select a device or program, select a problem area, then browse the tips and programs that Microsoft offers as a solution.

PCWorld - Articles seem to be kind of dated but still some good information in here

Microsoft at Home - Fix common PC problems - This guide from Microsoft covers the basics for keeping a healthy PC, plus tacks on some tips for locating problems. Reading through this should let you know if you have a software, hardware or connectivity issue and give you the smarts and apps to tackle it.

ESET Online Scanner - Free online Virus Scanner from ESET

Kaspersky Online Scanner - Free online Virus Scanner from Kaspersky (has been offline recently, good option if it is working again)

TrendMicro Housecall - Free online Virus Scanner from TrendMicro

Malwarebytes Anti-Malware (Download) - Very good malware scanner and removable tool. The official website is good, however they usually forward you to CNET’s Download.com which has started to do some very spyware-like practices themselves so I recommend downloading from FileHippo instead

SuperAntiSpyware (Download) - Another very good anti-malware scanner and removal tool

SIW - SIW, System Info. Shows hardware and software information, very handy

Increase the maximum transfer size of USB storage devices in Windows 7 or Windows Server 2008 R2

Ever thought that your USB storage device was running slower than it should? It seems that the default settings for Windows 7 regarding the maximum transfer size are quite low (64KB in fact). This means your speeds may in fact be lower than what they potentially could be.

To help with this issue, Microsoft has release an update to help users potentially increase their USB storage device transfer speeds. KB2581464 is the knowledge base article and the KB2581464 fix can be downloaded from here. After the fix you can change the maximum transfer size from 64KB all the way up to 2MB with the following directions:

  1. Click on start menu (or press Windows + R keys) and enter regedit

  2. Now navigate for following registry path (Note: VVVV represents device descriptor idVendor in hexadecimal and PPPP represents device descriptor idProduct in hexadecimal): HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbstor\VVVVPPPP

  3. Click Edit, point to New, and then click DWORDValue.

  4. Type MaximumTransferLength, and then press Enter.

  5. Click Edit, and then click Modify.

  6. In the Value data box, type a value to specify the maximum transfer size between 65535 (64KB) and 2097120 (2MB)

  7. Exit Regedit

The hotfix is compatible with Windows 7, Sp1 & Windows 2008 R2 (32 as well as 64 bit operating system).

Fix a Windows 7 network connection stuck in public mode

Microsoft released a fix today for an issue with network connections being stuck in public mode. When you connect to a network, there is an option called “Treat all future networks that I connect to as public, and don’t ask me again” which after selecting, you may not be able to change.

The fix can be downloaded from Microsoft Support KB and then click the Microsoft Fix It button which will download a program. Run that program and it will guide you through the fix.

There are also manual instructions which are:

  1. Close or suspend any applications that uses the network.

  2. Click Start, type device manager in the Search programs and files box, and then press Enter.

  3. Browse list of devices and click to expand Network adapters

  4. Right-click on the first adapter under Network Adapters and click Disable. (Repeat this step for all network adapters on your system under Network Adapters). Note: After each change, Device Manager will rescan your hardware. Your monitor may blink when refreshed, this is expected.

  5. While still in Device Manager, re-enable only the adapter that is associated with the public-network setting that you are trying to change. (Example, if you’re trying to connect to your wireless network, enable the wireless adapter.) Note: Your system will notice your network reappearing and try to connect. This connection attempt may fail, but that’s ok, this is expected.

  6. Click Start, and type Network and sharing Center in the Search programs and files box, and then click Network and Sharing Center, from the list

  7. In the lower left side of the dialog box, click Choose homegroup and sharing options.

  8. Click What is a network location?, and select your network location. Note: If you want to continue setting up a homegroup, follow the remaining prompts. But a homegroup isn’t required, so you also can simply exit the homegroup setup after you select the correct network location.

  9. The last step is to re-enable your remaining adapters, one by one in Device Manager. To do this simply Right-click each of the disabled adapters under Network Adapters and click Enable.

  10. When all Network Adapters are enabled, close the Device Manager and you’re done.

StartUpLite - Speed up your Windows startup

StartUpLite is a small (200k) program from Malwarebytes who also make the very handy Malwarebytes Anti-Malware

The software does one thing and does it well: provide a quick and easy method to remove or disable unnecessary application that start during Windows startup. The interface is pretty self explanatory so I’ll just post a screenshot.

StartUpLite

There is also a list of programs that StartUpLite checks that can be helpful to determine if this tool is useful for you or not.

Windows is unable to install to the selected location. Error 0x80300001

The above is a very annoying error I just encountered while installing a new VM (Windows 7 in this case) under ProxMox with a VirtIO hard drive. After scratching my head for a bit (after all, I had just manually loaded the Virtio drivers to get it to see the hard drive, which it was now and showing the correct size), I searched around and found a page with someone having the same issue.

It seems that the Windows 7 installer isn’t smart enough to tell you to switch back from your driver cdrom/dvd (a virtual one in this case but still) to the Win7 install media so it gives you this very unhelpful & cryptic error message. Once you have switched it back to the install media and hit refresh, it lets you continue on without a hitch.

Yay for vague error messages.

BlueScreenView

BlueScreenView by NirSoft is a handy little program I stumbled upon a while back. It loads the windows crash files and shows you USEFUL information from them. Without needing to have the Windows Debugger installed like with WhoCrashed and a bunch of others out there that I tried.

Probably the most annoying part is that I fought with a computer for a while one day that I couldn’t get the debugger installed on until I found this program. Then realized I already had it on my USB drive as I have the full NirSoft collection on it. Oh well, I know it’s there now

Download a copy at NirSoft’s Homepage