Windows XP Mode (XPM) for Windows 7 makes it easy to install and run many of your Windows XP productivity applications directly from a Windows 7 based PC. It utilizes virtualization technology such as Windows Virtual PC to provide a Virtual Windows XP environment for Windows 7. Windows XP Mode provides a 32-bit Windows XP Professional Service Pack 3 (SP3) environment pre-loaded on a virtual hard disk.
In this post I’ll demonstrate how to install, publish and launch PowerShell 1.0 side by side with PowerShell 2.0 which is already a part of Windows 7. First, you need to download Windows Virtual PC Beta and Windows XP Mode. Lets’ start.
Install Windows6.1-KB958559-x64.msu and reboot if asked to. Next run VirtualWindowsXP.msi
It is recommended to save the password you choose. That way you won’t have to enter the user credentials each time you launch XPM.
At this point XPM is loading and initializing its components
XPM performs auto logon (if you choose to save the user credentials). When you open My Computer you’ll see your Windows 7 local drives as mapped drives. That way you can copy/run files from Windows 7 into XPM. You cannot drag & drop files into XPM, maybe future releases will have that feature. Make a folder on one of your Windows 7 local drives and put there a copy of .NET 2.0 and Windows PowerShell 1.0. Install .NET and then install PowerShell 1.0.
Now for a little gotcha. Someone at Microsoft decided to block PowerShell and PowerShell ISE (and a bunch of other applications), XPM won’t publish their shortcuts to Windows 7 start menu. You’ll need to delete the ‘PowerShell’ values so XPM can publish their shortcuts.
I want to thank MVP Charlie Russel for sharing this tip with me!
EDIT: You can force XPM PowerShell to load your v1 profile if you disable the “Drives” sharing in ‘Integration Features’ (Tools | Settings…)
Now close the VM by pressing the X button (you may need to reboot the VM, press CTRL+ALT+DEL at the top menu and then press the Shutdown button).
Take a look at Windows 7 start menu, XPM will (hopefully) publish PowerShell shortcuts :-), you should see something like the following:
Close the VM (you may have to reboot it again) and check if the shortcut was published.
OK, now click the ‘Windows PowerShell (Virtual Windows XP 1)’ shortcut, you’ll probably get this dialog:
Isn’t that great!