Tuesday, June 10, 2008

Restore Default Folders Icon in Vista


Scenario:

A) One day, you open your profile and find that your beautiful Vista icon for Documents, Pictures, Music, Downloads folder is gone. Everything just revert back to old times yellow folder....


Materials needed:
1) Icon package(get the 'desktop.ini' for most folder)


Steps:
1) Go to your user profile folder and select the folder(for me, it's Documents) that you wish to transform back to default Vista icon.


2) Double click to open the folder. Then go to 'Organize'->'Folder and Search Options'.


3) Check 'Show hidden files and folders' and click 'OK'.


4) Right now you should be able to see the file named 'desktop'. It's configurations types of file so it has .ini extension. (If you don't see any file by that name, don't panic. You can just copy and paste the desktop.ini from respective folders in the Icon package)


*you might want to backup a copy of this file first.
5) Open the 'desktop' file. Copy following code(for Documents only) and replace it into the file content and save.
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770
IconResource=%SystemRoot%\system32\imageres.dll,-112
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-235

6) Log off windows and log in again to see the magic.


7) Follow step (4) to (6) for other folder that has lost its 'true colours'. Just make sure you replace the right 'desktop' code from few code listed below or from the 'Icon package'.

For Pictures folder,
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21779
InfoTip=@%SystemRoot%\system32\shell32.dll,-12688
IconResource=%SystemRoot%\system32\imageres.dll,-113
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-236
[LocalizedFileNames]
Sample Pictures.lnk=@%SystemRoot%\system32\shell32.dll,-21805

For Music folder,
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790
InfoTip=@%SystemRoot%\system32\shell32.dll,-12689
IconResource=%SystemRoot%\system32\imageres.dll,-108
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-237
[LocalizedFileNames]
Sample Music.lnk=@%SystemRoot%\system32\shell32.dll,-21806

For Downloads folder,
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21798
IconResource=%SystemRoot%\system32\imageres.dll,-184




Tuesday, June 3, 2008

Auto Ping Blueserver Using AutoHotkey


Options:

A) None.


Materials needed:
1) AutoHotkey (free from http://www.autohotkey.com).


Steps:
1) Install AutoHotkey and run AutoHotkey.

2) AutoHotkey shall appear at the taskbar.


3) Right click on it and select 'Edit This Script'.


4) Copy the text below and paste it in.
#MaxThreadsPerHotKey 10 ; Maximum time F7 can be activated
$F7:: ; F7 hotkey.
#MaxThreadsPerHotKey 1

if keepPing = y
{
keepPing = ; Make it blank to signal that thread's loop to stop.
return ; End this thread so that the one underneath will resume and see the change.
}

keepPing = y

Loop,
{
if keepPing = ; stop by pressing F7 again.
break
Send, {Enter}/p{Enter}
Sleep, 300000
}

keepPing = ; preparation for the next press of this hotkey.
return


5) And you will get this new script as shown below.


6) Close the script and right click on the AutoHotkey in the taskbar again. Select 'Reload This Script' to load your newly modified script.


7) To enable this Auto Ping script: in the blueserver game, hit 'F7' once to turn it on and hitting 'F7' again to switch it off.