Friday, August 22, 2008

Vista UAC not compatible with VS2005

So I tried installing Visual Studio 2005 on my Vista machine at home. After installing a default install of VS2005, you need to install three service packs to run it on a Vista machine:

  1. Visual Studio 2005 Service Pack 1
  2. Visual Studio 2005 Service Pack 1 Update for Windows Vista
  3. SQL Server Express Service Pack 2 (the SQL Server Express is installed by the default VS2005 installation but it's not Vista compatible without the service pack update)

So anyhow after that, it is recommended that you set the VS2005 app to "Run As Administrator".

Even then you'll probably run into a whole hose of issues noted by Microsoft.

The big three issues I ran into immediately even after doing this were:

  • Double-clicking on a file (*.cpp) launches VS2005 but fails to open the file in VS2005
  • Drag-and-Drop of a file(*.cpp) from Explorer to the VS2005 Editor Pane fails to open the file in the editor
  • Drag-and-Drop of a file(*.cpp) from Explorer to the VS2005 Project Pane fails to add the file to the project

Now the Drag-and-Drop issues (where VS2005 is the target for the 'Drop') also seem to occur for P4 and other programs.

Supposedly there are two ways to fix this:

  1. Set all your programs that could Drag-and-Drop to VS2005 to "Run as Administrator"
  2. Disable UAC

#1 is a bad idea since I'd have to Run as Administrator for Explorer which defeats a big chunk of UAC anyhow. Plus it'd be a pain to enable this for any program that could Drag-And-Drop to VS2005 (although right now that's probably only 3 programs for me: Explorer, P4, and FileLocator Pro).

I ended up disabling UAC (#2) for now which is unfortunate since UAC would be a good idea if it worked without extreme inconvenience to VS2005 users. However, disabling UAC also causes the Windows Security Center to put an angry icon in the system tray :(

Update: I tried re-enabling UAC and doing #1 but it turns out that #1 doesn't work. VS2005 only allows drag-and-drop with UAC disabled!

Monday, August 11, 2008

The VirtualBox Snapshot Manager Sucks

If you use the snapshot manager under VirtualBox, this post may keep you from inadvertently losing your most recent work in your VM.

I had VirtualBox mostly working but I borked my VM hard (disk errors on the vdi file) by trying to run DPaint (yup old DOS program) under it just for kicks because running crappy old software that's not compatible with your current OS is an ideal way to test a Virtual Machine. Well, VirtualBox didn't like DPaint. Not only did it hang the VM instance, but the VirtualBox app itself hung and I had to kill the app. This ended up corrupting my VDI (virtual disk image) file.

No harm done though... I made a snapshot after my clean install, and then another snapshot after applying all the XP updates, ie 7, WMP11, antivirus, etc, etc. Just revert to the last snapshot and I'd be fine.

So I did a revert but thanks to their crappy snapshot manager, I actually jumped back past my last snapshot and ended up blowing away changes (which was several hours of updating, installing, and tweaking to get XP running just right after the clean install).

Turns out in VirtualBox, if you "Revert to Previous Snapshot", it deletes your current state *AND* your last snapshot and goes to the second-to-last snapshot (while destroying your last actual snapshot). If you want to just revert to your latest snapshot, there is something like "Discard Current State" which really isn't that intuitive. If you have something that could potentially throw away a bunch of work in a non-recoverable fashion, your choices and explanation of the choices should be a bit more clear.

In VirtualBox, snapshots are linear -- there is no branching. Reverting to a snapshot is a destructive process that cannot be undone, and it's confusing because you can either revert to your latest snapshot (which they call reverting to current rather than revert to snapshot) or revert to the snapshot before that (which throws away all current changes as well as throws away your latest snapshot). It's not intuitive and you can lose work.

VMWare is definitely nicer for snapshots. The have snapshot trees (they allow branching points for a VM) which you can selectively revert to any arbitrary snapshot in the tree. Moving to another snapshot is non-destructive and you can move back and forth between branches -- i.e. ABCD revert to C have ABCE and then go back to D.

Oh well... now that I know how the sucky snapshot editor in VirtualBox works, I'm less likely to screw it up in the future.

BTW, one other little annoyance on top of all this... if you do a disk-check at startup under XP with VirtualBox, for some reason, VirtualBox won't reboot itself after the diskcheck completes so you have to do that manually.

Sunday, August 10, 2008

VirtualBox Free VM from Sun

Virtual Box from Sun is available here:

http://www.virtualbox.org/wiki/Screenshots

So I'm a big fan of VMWare (I own VMWare 5.5) and I have been thinking about upgrading to VMWare 6.0. However, I just heard of a free competitor called VirtualBox from Sun that's supposed to be pretty good.

So last night, I played around with VirtualBox and set up an XP VM under Vista with it. It's not as slick as VMWare but for $free$ it's not bad. The seamless window integration is particularly nice.

Even though I only played with it for a couple hours, it lags behind my VMWare 5.5 in the following features:

  • VMWare has better snapshot / revision handling
  • VMWare has all-in-one-directory portable VM's (currently VirtualBox has a machine file in one dir, disk files in another dir, and entries in a global xml table in a third dir)
  • Much faster 3D acceleration (VMWare does fairly decent DX8.1 in 5.5 and below and DX9 in 6.0 and above)
  • Multicore support (VMWare supports two virtual cores for multithreading)
  • Networking support (NAT only / I couldn't get bridging to work so I couldn't get Windows File Sharing between host and guest with my Vista Host since the guest didn't map to the same subnet)
  • Audio issues (the SB16 emu didn't work at all / you have to use the ICH for audio in XP guest)
  • Configuration is more painful than it should be... the default setup values are all too low (i.e. memory at 192MB, Vid Mem at 4 MB when you need at least 10 for seamless windowing) You need to tweak all the values and you won't find out that a feature isn't available until it fails and you have to shutdown the VM and go back and tweak.
  • Built-in shared directory implementation is non-obvious (you'll have to actually follow a walkthrough or manual to use them on VirtualBox)

I'm sure it would lag even further behind VMWare 6.0 (or the beta 6.5). However, for casual non-3D use (i.e. safe browsing, backwards app compatibility) it's not bad. If you were doing a lot of revisioning and deployment, needed reliable audio or 3D, or need bridged networking, you're better off with VMWare.

Here's where VirtualBox better than VMWare:

  • Free (vs $189 full price / $99 upgrade)
  • Vista Host support (my VMWare 5.5 only does XP and I have to pay to get VM6.0 if I want to run under Vista)
  • Seamless window mode is very nice (makes VM windows appear similar to host windows but I think this is in VMWare 6.0 as well)
  • Supposedly better 64-bit OS support (host or guest)
  • Supposedly better performance for non-3D software (although they both feel about the same speed in the tests I've done)


My out-of-the-box experience is that VMWare is much easier to use and setup and easier to make portable VM's. VMWare is easier to maintain with it's advanced snapshot management as well. Most of the reasons why VirtualBox is better from my simple testing boils down to the fact that it's free but if it's good enough, why pay for an alternative ?

GParted (Gnome Partition Editor)

So I wanted to change the size of a couple of my partitions on my HD and move stuff around. My older DOS version of Partition Magic 8 doesn't seem to like working with Vista and also seems to be a bit weird about handling my 1TB drives. So I looked around a bit and found GParted which is pretty cool.


It works fine with Vista and XP and large disks. Just a couple issues I've run into:

1) If you resize a Vista boot partition, you need to use your Vista Disc to "recover" the partition after the resize and then things will work fine.

2) GParted is much much slower than I remember Partition Magic being. I mean *REALLY* *SLOW*. Sure it works but be prepared to let it run for about 24 hours straight to resize a 700GB (only 50 GB used) partition on a 1 TB drive. I think PQMagic would have done the same thing in about 1/10 the time since it ignores empty blocks.

Tuesday, August 5, 2008

Windows Vista - Attempt #2

So I actually got XP installed on my computer after much pain and I decided to make it dual-boot Vista. My previous experience with Vista showed that it was very demanding on the harddrive in the following ways:

  • Windows Search Indexing (Background Building of Search Indices for Built-In Windows Search)
  • Registry: queries (reads) and small writes to the registry for nearly every action performed by the OS on a continual background basis.
  • Frequent writes to the PageFile for Virtual Memory
  • NTFS filesystem updates Last Access Time whenever a file is touched in any way (including just looking at it)
  • Additional journaling writes by NTFS
  • Runs "System Restore" on volumes by default
  • "Simplified" disk defragmenter scheduled to run on all volumes
  • May store arbitrary install and temp files on any drive (examples: MSOCACHE, ie temporary install files, service pack files, etc)
  • Runs background scans on disk (Windows Defender)
  • Writes for automatic optimization of disk for boot (SuperFetch)
  • Autoupdate background downloading
  • Various *.LOG files being written

Oh and then add 3rd party software

  • Antivirus Suite (this is a killer if you get a low one like McAfee or Norton)
  • Various updaters (Apple is very guilty here)

Vista has a great tool for seeing how much disk activity is going on. Hit CTRL-ALT-DEL then click on "Start Task Manager". On the "Performance" tab, click "Resource Manager". UAC will prompt you to continue. Then click to expand the "Disk" section. You can see even when you think your computer should be idle that Vista probably has several dozen outstanding writes queued up to the hard drive at just about any time.

Anyhow, my solution was three-fold for my second attempt at Vista.

1) Get the fastest HD possible. I bought a 300GB Western Digital Velociraptor 10K RPM drive. It's fast -- not quite as fast as the SSD's that should be coming out later this year or early next year but a lot more affordable. Pretty much the fastest drive that is still affordable. You can get one without taking a second mortgage on the house. If you can't drop $300 for the Velociraptor, the Samesung F1 1TB 32MB cache drive is very fast as well.

2) Reinstall Vista without any cruft. I was going to do a restore on the GT5628 and then uninstall as much cruft as possible. However, this wasn't necessary. Luckily the restore CD for my GT5628 doesn't restore to factory settings but rather to a clean Vista Install.

3) Install only fast security software. I installed "Comodo Firewall Pro" and "avast!" antivirus. They are much faster than Norton / McAfee.

Now the computer is mostly useable under dual-boot for XP or Vista.

The pain of downgrading to XP.

OK, so I downgraded to XP on my machine -- a Gateway GT5628 -- and let me tell you it wasn't easy.

First I tried installing XP Pro from a CD. BLUE SCREEN.

Then I tried slipstreaming SP1 into XP Pro CD. BLUE SCREEN.

Then I tried slipstreaming SP1 and SP2 into XP Pro CD. BLUE SCREEN.

I found out the BLUE SCREEN's were because I needed new drivers so I installed the DriverPacks BASE software (http://driverpacks.net/) and then installed the CPU, Chipset and MassStorage driver packs.

I tried installing the DriverPack + SP3 and it got into the install but then failed on the Product Key. So no longer a BLUE SCREEN but I do have a THIRD useless CD Coaster at this point.

Turns out that if you slipstream a SP3 XP disk under Vista, that Vista will screw with at least two of your files in the "I386" directory: PIDGEN.DLL and DPCDLL.DL_. The solution is to find an XP machine and slipstream your XP install disk under XP. Alternatively, supposedly you can still do it under Vista but copy those two files from your SP2 install or directly from the "I386\ic" dir in SP3. Anyhow, I just slipstreamed under XP and it worked.

Finally Install and you're good to go. I did a clean install on a fresh partition and everything worked pretty well.

The "Media Card Reader" and Network drivers for Vista from the Gateway site work under XP. I grabbed the latest video drivers from NVidia. The only issue was audio drivers and those I got from the Intel website.

So now XP works just fine and dandy on my GT5628 after about 10 tries to install that failed.