Windows Environment Variables

%ALLUSERSPROFILE% – C:Documents and SettingsAll Users
%APPDATA% – C:Documents and Settings{username}Application Data
%COMPUTERNAME% – {computername}
%COMSPEC% – C:WindowsSystem32cmd.exe
%HOMEDRIVE% – C:
%HOMEPATH% – Documents and Settings{username}
%PATH% – C:WindowsSystem32;C:Windows;C:WindowsSystem32Wbem
%PATHEXT% – .COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS ; .WSF; .WSH
%PROGRAMFILES% – Directory containing program files, usually C:Program Files
%PROMPT% – Code for current command prompt format. Code is usually $P$G
%SYSTEMDRIVE% – The drive containing the Windows XP root directory, usually C:
%SYSTEMROOT% – The Windows XP root directory, usually C:Windows
%TEMP% and %TMP% – C:DOCUME~1{username}LOCALS~1Temp
%USERNAME% – {username}
%USERPROFILE% – C:Documents and Settings{username}
%WINDIR% – C:Windows

Dynamic Environment Variables

%DATE% – Current date in the format determined by the Date command
%TIME% – Current time in the format determined by the Time command
%CD% – Current directory with its full path
%ERRORLEVEL% – Number defining exit status of a previous command or program
%RANDOM% – Random number between 0 and 32767

Enable SSL, SSL2.0, SSL3.0, TSL and PCT in IE

The following registry string allows all, individual or none of the security protocols to be enabled/disabled in Internet Explorer

The value of SecureProtocols represents which protocols are selected SSL,SSL2.0, SSL3.0 and TSL1.0. Hex value 000000a8 (decimal 168) is all enabled, setting to 0 disables all. Values can be set to enable some but not others.

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings]
“SecureProtocols”=dword:000000a8

Fixing Windows Sleep Issues

The following are things to try if you are having problems with your Vista/Windows 7 MCE sleep settings.

1. Goto Advanced Power Config and changed setting for sharing media to Allow computer to sleep

2. Make sure hard disk powers down before my machine goes to sleep i.e. set sleep to 10 minutes, then I see hard disk power down to 5 minutes

3. Check power settings on NICs especially nForce Network Controllers. Ensure the NIC can be switched off to save power and not wake the machine

4. The Windows 7 Media Center slide show screensaver can prevent sleeping. Disabled it in Media Center, it’s under the picture settings as it’s a photo slideshow screensaver)

5. There used to be a problem with homegroups in Windows 7. Being a member of a homegroup prevented going to sleep. Try removing it. (Control PanelAll Control Panel ItemsNetwork and Sharing CenterAdvanced sharing settings)

Adding Internet Explorer Icon to Desktop

If the Internet Explorer icon disappears from your Windows desktop past the following into notepad

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerHideDesktopIconsNewStartPanel]
“{871C5380-42A0-1069-A2EA-08002B30309D}”=dword:00000000

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerHideDesktopIconsClassicStartMenu]
“{871C5380-42A0-1069-A2EA-08002B30309D}”=dword:00000000

Then save the file as IE.reg. Make sure you have admin rights and double click the IE.reg file. Click yes to the warning. The shortcut should then appear on the desktop.

Windows not refreshing network drives in Explorer

When copying files or folders to a network drive they are not visible until refreshed.

This mainly effects DFS shared and has been patch since Windows XP SP2. However you may also require a registry change for the issue to be resolved.

1. Locate and then click the following key in the registry:
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer

2. On the Edit menu, point to New, and then click DWORD Value.
3. Type NoSimpleNetIDList, and then press ENTER.
4. On the Edit menu, click Modify.
5. Type 1, and then click OK.

Change font sizes in Outlook

Outlook 200 Select View -> Current View -> Customize Current View… from the menu in Outlook.

In Outlook 2003 View -> Arrange By -> Current View -> Customize Current View.

Click Other Settings.

Click on Row Font.

Choose the desired font, font style and size.

Click OK.

Optionally, change the font for the column headings as well by clicking Column Font….

Android AVD Networking

The following explains how to configure an Android AVD to communicate with the host machine.

Add this to the manifest.xml file which allows the app to create a socket

The Android AVD sits behind a virtual router with an IP of 10.0.2.1

To communicate with the host machine the Android application needs to talk to 10.0.2.2. This IP is mapped to the localhost loopback IP 127.0.0.1.

For example you have a server application running on the host listening to port 7777. The application running on the AVD will need to connect using 10.0.2.2 port 7777.

To pass data from a desktop client to an AVD it is necessary to set up a port redirect on the AVD router. To do this connect to the AVD using telnet, the first emulator port is 5554 (telnet localhost 5554). Then use the redir add command to setup the redirect. For example to redirect incoming TCP connections from the localhost to the AVD on port 5000 use the following redir add tcp:5000:5000. Any data passed to port 5000 on the localhost (127.0.0.1:5000) will redirected to port 5000 on the AVD (10.0.2.15:5000).