Wednesday, September 23, 2009

Creating Shortcut to Application Inside Windows XP Mode

The easiest way to get a Windows 7 shortcut to an application inside XP Mode is to load up the Virtual Machine and within the guest Windows XP, create a shortcut in C:\Documents and Settings\All Users\Start Menu.

This method can be used to create shortcut for Internet Explorer 6 and Outlook Express. However, when I use the same method to create a shortcut to Pinball Space Cadet, the Windows 7 shortcut isn’t created.

I found out that there is a manual way to create shortcut. The steps are as follows

  1. In Windows XP, create the registry entries for the Terminal Services Application Allowed List
  2. In Windows 7, create a shortcut to the application in XP Mode.

Creating the registry entries

I will attempt to create a shortcut to Pinball. The following is the registry entry I created.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TsAppAllowList\Applications\1234567]
"CommandLineSetting"=dword:00000000
"IconIndex"=dword:00000000
"IconPath"="%SYSTEMDRIVE%\\Program Files\\Windows NT\\Pinball\\PINBALL.EXE"
"Name"="Pinball"
"Path"="C:\\Program Files\\Windows NT\\Pinball\\PINBALL.EXE"
"RequiredCommandLine"=""
"ShortPath"="C:\\PROGRA~1\\WINDOW~1\\Pinball\\PINBALL.EXE"
"ShowInTSWA"=dword:00000000
"VPath"="%SYSTEMDRIVE%\\Program Files\\Windows NT\\Pinball\\PINBALL.EXE"

image

The “1234567” part in [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TsAppAllowList\Applications\1234567] is some random numbers that I had come up with. This number will be used later in the Windows 7 shortcut.

The "CommandLineSetting"=dword:00000000 "IconIndex"=dword:00000000 "RequiredCommandLine"="" "ShowInTSWA"=dword:00000000 are some default values that I have copied over from the 5664112 entry, which is the entry to Internet Explorer 6.

"IconPath"="%SYSTEMDRIVE%\\Program Files\\Windows NT\\Pinball\\PINBALL.EXE" determines what icon will be used. Windows 7 will extract the icon at this location and store it in Windows 7’s folder at %USERPROFILE%\AppData\Local\Microsoft\Windows Virtual PC\Virtual Applications\Windows XP Mode

"Name"="Pinball" is used for naming the icon that is extracted in the previous step. It will be used in the Windows 7 shortcut later.

"Path"="C:\\Program Files\\Windows NT\\Pinball\\PINBALL.EXE" and "VPath"="%SYSTEMDRIVE%\\Program Files\\Windows NT\\Pinball\\PINBALL.EXE" are the path to Pinball.

"ShortPath"="C:\\PROGRA~1\\WINDOW~1\\Pinball\\PINBALL.EXE" is the 8.3 path to Pinball.

We can get the 8.3 filenames step-by-step. To get the 8.3 filename of c:\Program files, type cd \ dir "Program files*" /x You will see something similar to Volume in drive C has no label. Volume Serial Number is 24FE-A31E

Directory of C:\

07/26/2009 05:57 PM <DIR> PROGRA~1 Program Files 0 File(s) 0 bytes 1 Dir(s) 134,463,721,472 bytes free

PROGRA~1 is hence the 8.3 filename for Program files.

image

Creating the Windows 7 shortcut

Create a shortcut in C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows Virtual PC

image

Set the Target to %SystemRoot%\system32\rundll32.exe %SystemRoot%\system32\VMCPropertyHandler.dll,LaunchVMSal "Windows XP Mode" "||1234567" "Pinball"

"||1234567" "Pinball" correspond to the random number and the Name that I have specified in the Create the registry entries step.

Tuesday, September 22, 2009

Office 2010 CTP compatibility with Nokia PC Suite and Visual Studio 2008

I use the Nokia PC Sync feature to get my handphone calendar and Outlook calendar in sync.

A clean install of Windows 7 Professional, Office 2010 64-bit edition and Nokia PC Suite 7.1.30.9 didn’t work out well—the PC Sync could not detect Outlook and thus cannot synchronize.

Apparently, Nokia PC Sync can only detect the 32-bit version of Office 2010. So I uninstalled the 64-bit version and installed the 32-bit version and everything works fine.

Then I installed Visual Studio 2008 Team Suite. It hung when I load up the designer for WebForms. Editing the ASPX file is OK though.

The solution I found was to reinstall

C:\Program Files (x86)\Common Files\microsoft shared\OFFICE12\Office Setup Controller\Setup.exe

There are incompatible programs that I have not found a solution to. Office Live Workspace Addin cannot be installed and Acrobat Professional Addin needs to be disabled or it crashes Office. Please comment if you have the solution. Thanks!

Monday, September 21, 2009

Getting Chinese Handwriting Recognition on Windows 7 Professional

Installing Language Pack

To have Chinese Handwriting Recognition, the Chinese Language Pack needs to be installed. According to Microsoft Help and Support, Windows 7 language packs are available for computers that are running Windows 7 Ultimate. Implicitly, it means that other editions of Windows do not have language packs.

To verify that, the instruction from Windows 7 Center showed the following UI in Control Panel>Regional and Language that can be used to install additional language packs.

image

However, as I am running Professional Edition, there is no Display language group.

image

Does this really mean I can’t get language pack into my Windows 7 Professional? My previous experience says that it is possible to turn Windows XP into Windows Server 2000, and also enable RAID-5 on Windows XP Pro. There must be some way to get language pack.

Sure enough, I discovered that there is another way for me to install a language pack. On WinMatrix forum, the instruction given is as follows

MUI can be also installed on Professional edition avaliable at MSDNAA: Run CMD as administrator and type: DISM /Online /Add-Package /PackagePath:(path to lp) then: bcdedit /set {current} locale (your locale) and: bcdboot %WinDir% /l (your locale) Then in registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MUI\UILanguages remove key en-US Reboot and it's done

To get Simplified Chinese and Traditional Chinese language pack into my system, I typed for the first part of the instruction

DISM /Online /Add-Package /PackagePath:D:\langpacks\zh-cn\lp.cab

and

DISM /Online /Add-Package /PackagePath:D:\langpacks\zh-hk\lp.cab

image

Installing Handwriting Recognition

Go to Control Panel>Regional and Language

Click on Change keyboards…

Click on Add…

Check Chinese (Simplified) – Microsoft Pinyin New Experience Input St and Chinese (Traditional) – New Phonetic in the following dialog

image

Once added, you will see the following dialog

image

and on your task bar, you will see a new EN button added

image

Turning the Input Panel on and switching to Chinese, I can start writing.

image

Edit: The language pack seems to un-install itself. Anyone knows how to get it to stay?

Edit (April 25, 2010): Read the comments for the method to stop the "uninstall".

Edit (March 27, 2010): I managed to get both English and Simplified Chinese to stay installed some time ago. The method will most likely not work with more than two language packs though.

  1. We need to continue with the next step of deleting registry keys as mentioned in the WinMatrix forum. So launch the registry editor, navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlMUIUILanguages and delete the "en-US"
  2. Restart computer. Now, everything should be displayed in the language you installed previously.
  3. Install the en-US language pack using DISM. Launch the registry editor, navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlMUIUILanguages , export the registry entry for the language you had installed before restarting and delete the registry entry.
  4. Restart computer. Now, everything should be in English again.
  5. Import the registry entry back.
  6. The two language packs should stay even after restarting.

PS: Although this method seems to work, on examining the registry entries that are changed, they are in a wreck, with some settings referring to en-US and others zh-CN. So far, I did not notice any consequence. Try it at your own risk!