Script To Clear Event Logs

Awesome script to clear all of your Windows 7 event logs. Wish I remembered where I sourced it from to give them credit.


@echo off
FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
echo.
echo Event Logs have been cleared! ^ goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl %1
goto :eof
:noAdmin
echo You must run this script as an Administrator!
echo ^ :theEnd
pause>NUL

TextPad and Excel Slow To Open Files

I recently discovered an issue on my Windows 7 x64 system where double clicking text files (associated with TextPad) and Excel files (associated with Excel) took over 30 seconds to open the file.

A few forums on the Web suggested that the problem was that a program on my system may be blocking DDE messaging. In my case it turned out that Acronis TrueImage 2012 was the issue.

After uninstalling this bad boy I found that my file open timings returned to normal.

New BlackDog Service

I thought I’d mention a new product that we’ve been working on in our spare time. It is a service that allows iphone and android developers to keep data on the phones in sync with a master database.

It is very easy to use, is free to use, and is hosted on the BlackDog Foundry. The basic gist is that you log on to the BlackDog website and save the baseline data for your database. You then link in some iphone or android libraries on the device, and make a simple one-line call that will fetch new or changed records. It handles both incremental and full replications.

Check out our latest sqlite replication blog post for an example of how to use it.

BTW, the service also has preliminary support for Push Notifications.

HowTo: Boot Your Mac Into 64-bit Mode

For those of you that are running the new version of MacOS – Snow Leopard, it may come as a surprise that by default, the kernal boots into 32-bit mode. However, you can change the OS to boot the kernal into 64-bit mode by running the following:

1. Run:

ioreg -l -p IODeviceTree | awk -F'"' '/firmware-abi/{print $4}'

and make sure it returns EFI64

2. If the above command returns EFI64 then edit the following file:

sudo vi /Library/Preferences/SystemConfiguration/com.apple.Boot.plist

and replace the contents with:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string>arch=x86_64</string>
</dict>
</plist>

3. Save and reboot

Citation

HowTo: Change Account Order in Thunderbird

To change the order of the accounts in Thunderbird:

  1. Shutdown Thunderbird
  2. Edit ~/.thunderbird//prefs.js in GNU/Linux, C:\Documents and Settings\\Application Data\Thunderbird\Profiles\****.default\prefs.js in Microsoft Windows XP, and C:\Users\\App Data\Roaming\Thunderbird\Profiles\****.default\prefs.js in Microsoft Windows Vista and 7.
  3. Edit those the following 2 lines to change the order of the accounts. The default account is always first one.

user_pref("mail.accountmanager.accounts", "account5,account3,account2");
user_pref("mail.accountmanager.defaultaccount", "account5");

Xbox 360 – HDMI Audio Problems

I had an issue the first time I turned on my new Xbox 360 where I was unable to get audio working via HDMI. After many hours of experimentation I discovered that if you go into the Display settings there is an option called “Display Discovery” which is turned on by default. If you’re running your Xbox through an Audio Receiver or similar device it appears that the auto discovery mechanism built in to the Xbox occasionally results in Xbox being set to “DVI Mode” i.e. video only.

The way to resolve this problem is to just turn”Display Discovery” off and restart the Xbox.

Window 7 – No Internet Access

For the last few days I have occasionally encountered the problem whereby my local network access worked fine. However, my Internet access was “unavailable”.

In my case, the problem was due to a race condition between the Apple Bonjour service and the DHCP lookup. The easy way to check if you have the same problem is to start a Windows command and run:

C:\>ipconfig

If your Default Gateway has a 0.0.0.0 listed then the is a fair chance that you may have the same problem e.g.

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . : domain.local
   IPv4 Address. . . . . . . . . . . : 192.168.0.166
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 0.0.0.0
                                       192.168.0.1

The solution is to change the Bonjour service “Startup type” from Automatic to Automatic (Delayed Start)