Category Archives: Windows

A Weekend with Windows 7

In-between other household duties I spent most of this weekend with the new Windows 7 Beta 1. While I probably would have been more sensible to install it in a Virtual PC, I really wanted to experience it, and the best way to do that is by using it. Thus I installed it on my HP Pavilion DV-8000 laptop.

The first pass I did Friday night, when I installed Windows 7 as an upgrade to my installed Vista SP1. Now, let me say Microsoft has clearly stated you should only install the Beta as a clean install, not as an upgrade. However I figured since it was going to get wiped anyway, I might as well see what the experience was like. The upgrade took about 2 hours and afterward things were not overly stable. Some things worked fine, but other things did not. For example, Virtual PC’s built in network drivers quit working, although I could still use Shared NAT. My Zune software also started acting odd, it would no longer connect to my Zune. The PC knew the Zune was connected, the message just didn’t get to the Zune software.

Saturday morning I played with it a bit more, and being unable to resolve my Zune issue decided to take the plunge, reinserted my Windows 7 DVD, and reformatted my C drive so I could do a clean install. The install went very quickly, around half an hour not counting the formatting. Since then I have been slowly restoring my various applications, and wanted to share a run down on what I’ve done so far.

Before I go any further though, one very critical item. One of my Twitter friends @devhammer alerted us to a bug for Windows Media Player in Windows 7. It is Support Article 961367, and it fixes an issue with Media Player corrupting MP3 files. The first thing you should do install it!

Next, after the Windows 7 install I found my resolution stuck at 800×600. Yuck! So I ran Windows Update, and it found a driver for my NVidia chipset and installed. (Hooray for Windows Update!) After the reboot I was returned to 1400×900 on my laptop display and 1600×1200 on my external monitor. But not all was well with the world, there is one odd bug. By default the wallpaper is this bluish looking fish. Not being a fish person I switched to the Landscape theme. Windows 7 has this cool feature where you can pick multiple desktop wallpapers, and it will rotate through them at a frequency you can set,  the default being every 30 minutes. This though seemed to cause an issue with the Zune software, every time the wallpaper changed, my Zune software went completely blank and never came back. It was still working, my Zune player was showing data being synced, but the display went blank. I used task manager to shut it down then could simply launch the Zune software again with no problems.

The moral of the story, if you have NVidia graphics, set the rotating wallpaper on, and have display issues, simply pick ONE wallpaper and disable the rotation. Once I did all was well with the world. Now onto my software installs. 

Norton Anti-Virus, Corporate Edition – Seems to work OK, but I get an error message about the End Point process being shut down for compatibility issues. Since I hear Norton has discontinued this product, I will likely move to either Windows Defender or purchase the full blown Norton closer to the Windows 7 release date.

FireFox 3 – Works great, no issues.

UltraEdit 14 – Also works great, no issues.

TouchCursor 1.6 – After I installed I had to reboot to get it to take effect, but once I did it’s worked great. (If you don’t know what TouchCursor is, go to http://touchcursor.com, great utility!)

Zune – Software installed fine, but of course switching to what appeared to the Zune as a new PC caused me to need to reset my Zune so I didn’t wind up with a big blob of “unreachable” disk space. I had backed up all my Podcasts, and copied them back over and the Zune software recognized them all, but I still had to go to each one, right click, pick Subscribe. Fortunately I have a second PC in my office where I played some videos on http://www.jumpstarttv.com/ while clicked endlessly. (I subscribe to a LOT of podcasts.)

Office 2007 Enterprise – Installed just fine with no problems. Well no software issues, my backup of my main PST was corrupt so I lost most of what was in it (drat). Good lesson here kids, with something really important, make TWO copies on different drives during back up!

Microsoft Virtual PC 2007 SP1 – The only issue I had was with the built in firewall, I had to create a new rule for ANY to allow things other than UDP and TCP to work. Go to Start, Control Panel, System and Security, Windows Firewall, Advanced Settings (over on the left), Inbound Rules (in the new dialog that appears), then I copied one of the existing rules for Virtual PC 2007 SP 1 (there should be 2, one for UDP the other for TCP). In the copy, open it, go to the Protocols and Ports and pick Any. You’ll get an error that says “Edge traversal can’t be set to ‘Defer to User’”, so go to the Advanced tab and pick either “Allow” or “Block”. I picked Allow because I’m very cautious about where I go in my VPCs.

Live Writer – I went to the http://windows.live.com and downloaded the LiveWriter tool, which I’m composing this post in.

Notable mention: I had to copy a little over 3 gig of files, it was fast in Windows 7, took under 3 minutes.

A few things I’ve heard about, but haven’t yet experienced:

I’m told there’s a copy / paste issue between Word 2007 and Live Writer. Haven’t tried it.

I’m told Virtual Clone Drive, which I used in Vista to mount ISOs as virtual drives, won’t work in Windows 7. Instead I had PowerISO recommended to me.

That’s my progress for now, I will update you as time goes by. Remember if you decide to install and use Windows 7, it IS a beta, so your stability may be different depending on the state of your machine’s drivers. I also haven’t decided how long I will run Windows 7. If it’s stable, and some critical pieces of software work (like my VPN software for work) then I may keep it a long time. However if stabiltiy becomes an issue or key software doesn’t run I may have to return to Vista, I will just have to see how it all shakes out. I would like to keep it around for a bit though so I can give it a good shake and let our friends in Redmond know of any issues so they can fix now and perhaps save someone else headaches when it goes to production.

I have also been Twittering my progress using the #win7 tag, if you want to follow me there.

Advertisements

Differencing Disks in Virtual PC 2007

Yesterday I mentioned I was going to get SQL Server 2008 installed in a Virtual PC (VPC). Now, I could have setup a virtual machine from scratch, or copied an existing one. But there’s a better way: differencing disks. Differencing disks allow you to create a virtual machine, then use it as a base for new machines. Much like you would create a base class and then let new classes inherit from your base.

My first step was to create a brand new virtual PC. I chose Windows Server 2003, using the one from my MSDN license. I could also have gone with XP, or the advanced versions of Vista licenses you to install up to four virtual machines in addition to itself as the host. So I get my VPC setup with Windows Server 2003, and make sure all of the windows updates have been applied, service packs, etc. In addition, if there are any additional tools / utilities I’d like to have available for every machine I’ll be wanting create from it I’ll install those as well. I’m thinking of things like UltraEdit / Notepad++, IE7, AllSnap, etc. I finally conclude by shutting down the machine.

Exit Virtual PC, and go to the folder where your virtual PC’s reside. First delete the VMC file (the small one) of your Virtual PC. You won’t need it any more, as you’ll never open this VPC directly. If you did, you would break all the machines that inherit from it. Again, not unlike changing the signature of a base class.

Next, mark the VHD, the hard drive as Read Only. Again this is for your protection, to keep you from doing something accidental to the base. At this point we have our base machine created, and can now make new machines from it.

Launch Virtual PC again. Click on File, Virtual Disk Wizard. You are given a simple dialog that lets you know you’re in the Virtual Disk Wizard. Click Next to move along.

[Picture 1 - Welcome to Virtual Disk Wizard]

Next it asks if we want to create a new disk or edit an existing one. We’ll want to create a new one, so just click Next.

[Picture 2 - Create a new virtual disk]

Now it wants to know what kind of disk to create. We’re doing a hard disk, so just take the default of virtual hard disk and click next.

[Picture 3 - Disk Type]

Now it asks where you want to put your virtual hard disk. I keep mine on my D drive, and use a naming convention. I start with the OS, then the main software I am using. I then use either the word Working, to indicate it’s alright to launch and work in it, or Base, to show the vhd should only be used to inherit from and not be launched. In this case I will be using this as a working area for my SQL Server 2008 CTP6, so I used Working. You are free of course to name it whatever you want, use a name like “Hanselman is cool.vhd” if you like I just prefer something a bit more logical.

[Picture 4 - Disk Location]

OK, this is where you need to pay attention, as this is the first time you’ll need to change a default. Here you are asked what type of virtual hard drive to create. The default is dynamically expanding, and it’s what you’d want to use if you are installing an OS from scratch or are creating a second hard drive for your virtual machine. Fixed size would be used if you are creating a disk for something like a USB drive and want to make sure it won’t get too big. Again, this would be used when you need an empty drive.

In our case we want the third option, Differencing. What this does is tell the Virtual PC application to base the new hard drive on an existing one. From here on out, only the changes you make to the virtual drive will be recorded. This has a lot of benefits. First it saves you disk space, in that you can use the same base with multiple virtual machines. Second, it lets you install the base OS only once, and not have to keep recreating it over and over. Finally, you can create multiple generations of disks. For example, I could create a base of Windows 2003, then another base with Visual Studio added. I could then use that base to inherit from, and create two drives. One could be used with SQL Server 2008, the other with SQL Server 2005. In our case we’re keeping it simple, so pick Differencing and click next.

[Picture 5 - Hard Disk Options]

Next we need to pick the virtual hard drive we want to base our new machine on. In this case I am selecting my Windows Server 2003 core base, and clicking next.

[Picture 6 - Pick Base Hard Drive]

Next we are told it has all the info it needs. All we have to do is click Finish and we’ll have our new Virtual Hard Disk.

[Picture 7 - Complete Disk Creation]

Virtual PC thoughtfully tells us it was successful.

[Picture 8 - Confirmation Message]

OK, we have a new disk, but now we need to tell Virtual PC we want to use it. Back on the Virtual PC Console, Select File, New Virtual Machine Wizard OR click the New… button on the console. Virtual PC has a need to tell us what we just picked, so just click Next.

[Picture 9 - Create Machine Wizard]

This time we are creating a new virtual machine, which will be based on the virtual hard drive we just created, so take the default and click next.

[Picture 10 - Create a machine]

Next we need to give our machine a name. I usually give it the same name as the hard drive, except for the vmc extension. Name yours and click next.

[Picture 11 - Macine name and location]

Now it asks what OS we’ll be using. Note it has automatically detected that I’m using Windows Server 2003, so all I have to do is click next.

[Picture 12 - Confirm Operating System]

Now it asks what my default RAM size will be. I figure 256 MB is a bit small, since I have the ram I upped it to 768 MB. Set yours according to the free space you can spare and click next.

[Picture 13 - Select default amount of memory]

Now we’re asked if we want to use an existing disk or create a new one. Obviously we want to use the differencing one we just created, so click next.

[Picture 14 - Existing Disk or New Disk - We want existing]

Next it asks where our existing drive is, pick it out using the Browse… button or type it in.

[Picture 15 - Pick name of existing disk]

Let me call your attention to the Check Box, “Enable undo disks”. If you leave this unchecked, your virtual machine will behave like a normal computer. Any changes you make are applied and saved. If you check the undo option on, then during your session any changes are written to a temporary file. When you exit the VPC, you are asked if you want to save any changes you made. If you say yes, they will be permanently applied to the virtual machine. If you say no, they are discarded, lost forever. Undo disks are ideal for test situations where you want to run the same changes over and over but not save them. Testing software installs, for example, or in a classroom where you want the students to do labs but not save them.

While Undo Disks can be very helpful, in this situation I don’t really need them as I want to keep all my changes so I will leave this unchecked and click next.

[Picture 16 - Complete Machine Wizard]

OK, we’re at the finish line. All we have to do is click Finish to complete the creation of our new virtual machine.

Let me call your attention to the file sizes of our new machine. Take a look at them in explorer…

[Picture 17 - Explorer snapsho showing small size of vhd]

Note how tiny the vhd file is right now. That’s because it’s based on another drive, where all the OS bits are. As we open it and apply changes (such as installing SQL Server 2008) it will grow in size, but we’ll always be able to save the disk space of the OS as it’s coming from another file.

The down side to differencing disks is speed, because they are in multiple files the performance won’t be as great. Additionally you can’t update the base machine without breaking its descendants. However, differencing disks offer several advantages as well. They save you time, in that you can create a base OS once and use it over and over. As you can see above they can also save you disk space, in that the core OS only takes up space once on your drive and not over and over.

Consider Differencing Disks, and whether they might be appropriate to your development environment.

Do It Yourself Quick Launch Menu

One of my upcoming presentations at Alabama Code Camp 6 will be “The Developer Experience”. I intend to cover three aspects of the developer experience: physical, virtual, and mental. Falling into the virtual category are things like Windows and Visual Studio Add-Ins. Launcher programs seem very popular these days, and I’ll be covering a few of them in my presentation, but did you know it’s very easy to create your own “quick launch” menu right on the Windows Start Bar? (I’ve also heard it referred to as the Task Bar.)

Start by going to your “My Documents” or some other location on your drive. Create a new folder, and give it a name. I chose something short, “Dev”, since it’ll take up some space on the Start Bar and it was pretty descriptive. Now in this folder you should create short cuts to all the applications you use on a frequent basis. You can also create other folders, which will turn into submenus when we’re done. Here you can see I’ve got my shortcuts, plus one folder called “Directories” which holds shortcuts to folders I access frequently. Here’s a ‘best practice’ for you: I also find it a good idea to create a shortcut to the Dev folder itself, so you can quickly and easily add or remove shortcuts to your system.

diymenu01

Once you have all of your shortcuts, right click on your start bar and pick Toolbars, New Toolbar (I’m doing this in Vista by the way, but it works equally well in XP as I’ve done it there for years).

diymenu02

When the New Toolbar dialog appears, navigate to the place where you stored your “Dev” folder, click on it and click “Select Folder”.

diymenu03

Now you should see a new item appear on your Start Bar with the word “Dev” (or whatever you named your menu). Here you can see my menu; I’ve highlighted the “Directories” submenu so you can see it working as well.

diymenu04

If the menu doesn’t appear where you want it simply click on the little bar to the left of the name of the menu and drag it where you want. Your menu may also appear but “spread out”. If so, simply place the cursor over the bar, and drag it back into a collapsed position as I demonstrate below.

diymenu05

You can create as many of these little do it yourself quick launchers as you want. I usually have my Dev menu all the time, which holds my generic shortcuts or shortcuts to general items such as my RSS reader, Visual Studio, or Paint.Net. When I’m working on a big project, I like to create shortcuts specific to that project. Thus I’ll create another one for that specific project that will open the folders where my source code or data is stored, has links to open the project right in Visual Studio, and more. They are easy enough to take off the Start Bar, simply right click on the menu again, go back to Toolbars, and click on the menu name. It will remove itself from the Start Bar, but the folder will remain intact for when “phase 2” of your project comes around.

Using my “Do it yourself quick launch menu” I almost never need to go through the Start Menu. In addition it allows me to keep my Quick Launch toolbar extremely small, I only have icons there to apps I really do use many times a day. And the best part is it’s all built into your copy of Windows already. Nothing to download, install, no additional overhead, totally safe and secure. This is a real benefit when you work in an environment where you are not allowed to install any third party applications. Give it a try and see if you don’t find it a better way to work.