2009-08-09

Visual Studio 2003 Under Windows 7

The last post contained a mention of how useful XP Mode in the Virtual Machine (VM) environment is. A bit more tweaking has led me to abetter than virtual solution for using Visual Studio .NET 2003 (VS 2003) on Windows 7 (64-bit Ultimate). It is more efficient by far if you are developing web applications, as the VM is done away with in favour of a few tweaks.

The steps to get VS 2003 running on Windows 7 to do ASP.NET 1.1 web development are:

  1. Install Internet Information Server (IIS) 7;
  2. Install .NET 1.1 on Windows 7 (see How to install ASP.NET 1.1 with IIS7 on Vista and Windows 2008);
  3. Install the FrontPage Server Extensions on IIS 7 (see Installing the FrontPage Server Extensions on IIS 7.0);
  4. Install VS 2003 (see How to use Visual Studio 2003 in Windows Vista, which works for Windows 7, and you don’t need to mess with the UAC); and
  5. When running the a project, remember to “start without Debugging” and then hook the worker process (also described in the link for step 4).

While not ideal, if you need to support a legacy application it works.

A few notes:

  • If you mark the shortcut to the VS 2003 development environment to run as administrator (compatibility mode under properties, which you get to by right-clicking) you can avoid much grief.
  • If you set the worker process identity that runs ASP 1.1 applications (process shown in link for step 4) to your user account, or some such, you can greatly ease the process, assuming that account is administrative and can access the project folders for the application.
  • Remember to attach to the worker process rather than the browser when attaching to item to be debugged.

I give a dutiful nod to the entries and articles linked above.

2009-08-08

Windows 7 RTM: Transitional Thinking

Technorati Tags: ,,

 

On August the 6th, 2009, Windows 7 RTM, the gold release for the new Microsoft (MS) Operating System (OS), was released to MSDN and TechNet subscribers. Having a good experience with the Release Candidate (RC), I decided it was time to bite the 64-bit bullet and transition not only from Windows XP as my primary OS, but from the 32-bit builds to the 64-bit Ultimate Edition of Windows 7. I downloaded the bits on the 6th, and on the 7th I took care of my wee princess, who was sick and needed me a lot more than the computer. After she went to bed around 7 PM, I dug in and began the transition from the old to the new. This blog post logs my experiences, and tosses in a record of some technicalities that may provide value to other hopeless folks who just need to take this plunge.

The Installation

A few points of observation:

  • There is no direct upgrade path from Windows XP regardless of where one heads, so none of this transitional work was as simple as slamming in a disc and sitting back; yet, despite the need to do a clean install, this was one of the most straightforward installers I have ever seen.
  • I installed to a secondary partition (I always have a couple OS sets going, just to amuse myself and experiment.), meaning I had zero-risk of loss of productivity. Even though the install is straightforward, I recommend anyone braving this transition do the same. Clear another partition and let the beast dual-boot until you get used to the new OS.
  • Phase 1 of the install (copying the guts an such) went smoothly and took ages (as expected), making for about 60% of the total install time. The only quirk noted was that on rebooting the boot loader list showed two entries for Windows 7. I had the RC on the partition before and while I chose to format the partition during the installation, mostly to check to see how the boot loader list handled the process. More about that shortly.
  • Phase 2 of the setup was the post-restart configuration, and much to my surprise the speakers on the box clicked (proof the driver was working, which was not the case with the RC); and the video resolution was set perfectly, along with the OS even identifying the make of monitor I have attached. In every way, this hardware detection process was flawless, and the best I have ever seen from a Windows install experience.
  • Phase 3 started with a pleasant surprise, though small, when the boot list erased the old Windows 7 entry and cleaned itself up (it wasn’t always that smooth in the old Windows days). The speakers clicked a few more times (was it the wrong driver?), and the network was detected and configured correctly as to its hardware components. The questions asked of me were few, and the end result was the only complaint I have is that the Software Key should be asked for and stored in the pre-detection phase – I’m sure an algorithm exists to approve it that early in the process, and not doing so is annoying.
  • Post-install the sound worked perfectly, the network was immediately functional, auto-updates went off without a hitch, and the new trouble-shooter immediately informed me my old flatbed scanner had no valid driver. It asked if I wanted it to make a suggestion, I let it, and it provided a direct link that got me within two clicks of a driver that worked on the first try.

Those technicalities aside, the general impression I have is that they did this correctly. I had a 64-bit system, a flawless install experience, and all the minor annoyances of the RC install were gone. That every system component had a valid 64-bit driver was a surprise to me, and that they worked perfectly made me classify this experience as an ideal OS install. I have been installing OS bits for 27 years now, and this was the least painful one of all time. Kudos to MS on the process and execution of an impressive technical install.

Kudos given, I do have to add a few quirky asides:

  • It would have been handy had MS provided some kind of upgrade path for Windows XP (the file settings gadget I didn’t try, but it is far too technical an idea for common folks). Most of the people who might like to upgrade to this OS simply have no path to it, and businesses are going to choke on the rollout costs of having to reconfigure boxes. Not having an easy upgrade path for XP is a head-scratcher.
  • As for the Vista upgrade path, one exists, but I wonder why anyone would bother. The bits are not that different internally, and the reality is the last Vista SP solved most of its remaining issues. The Graphical User Interface (GUI) here is a bit improved, but not enough to imagine Vista users will champ at the bit to get this build.
  • This leads me to my focused thought on upgrades: they are either too complex for normal people (from XP), or largely irrelevant to folks with newer systems (Vista). So, why even bother? Why not just force a clean install, but write a pre-installer utility to snapshot the old OS first, then merge out the main configuration elements?
  • Another thought that is valid here is why this OS has a 32-bit version. I wouldn’t recommend it to anyone running older hardware (not worth the effort, as they will have XP and no easy path up), and given that almost all new machines are 64-bit capable, why bother with the other? I’m sure businesses will suggest they need it, but the reality is this system, like Vista, needs newer hardware to shine, and XP is still fine for an old banger of a box doing word processing. I’m going to go out on a limb here and say that the next client-side OS from MS will be pure 64-bit. They are transitioning Office 2010 to that world, and I can’t see them holding off much longer and maintaining the old builds much longer.

Overall, the installation of Windows 7 is a joy to behold, and the end result is a fairly clean disc, unlike many past versions of MS software.

Post-Installation Quirks & Impressions

I’ll preface this section about two enormous balls-on-ice quirks by observing that neither have to do with MS, and I’m not sure they could have resolved them easily if at all. Anyhow, there were two “issues” that arose after the post-install shutdown and restart. (I always do one hard shutdown after a successful install to get a feel for the raw OS load times from cold start.)

  • Shutdown didn’t work correctly. The OS shut down, but the fan on the machine kept whirring – a no power-down condition. I had to do a hard restart, and after a speedy reboot (the OS is rather quick compared to Vista) I dug around till I discovered that the issue was with the “VIA 1394 OHCI Compliant Host Controller.” It’s irrelevant exactly what it is (its a fire wire connection controller), but the cause of the shutdown failure turned out to be simple: the controller was monitoring for wake-up calls (to pull out of hibernation, etc., during an incoming data packet condition). For anyone who ever struggled with the issue, the device manager in control panel will get you to the controller entry (as named earlier) and if you right-click, select Properties, and go to the power management tab you can quash the issue by checking the box beside the words “Allow computer to shutdown…etc.” This resolved the shutdown issue immediately. (I imagine the BIOS could have killed this, but device manager is wiser most times when it works.)

After the shutdown and power-down was resolved, I ran the performance index utility and discovered the second oddity. My box was reporting a mere 3 GB of RAM (it had 4, and will have 8 Monday morning). This led me to dig, and discover the second quirk (again, no fault on MS).

  • Modern hardware is almost always 64-bit capable, with a host of powerful tricks built in. One such trick is memory mapping, which is an asinine way to allow 32-bit Windows to maximise the channels and get 3 GB instead of 2 GB off most common workstation motherboards. (The other 1 GB is usually punted to the video card, so it isn’t wasted. Technically Windows 32-bit editions should be able to address all 4 GB, but that isn’t possible in the morass that is physical address management on modern workstation boards – and, that explanation isn’t technically precise, but it gets the point across, so we’ll keep it simple.) Now, a 64-bit register set should have the ability to get 16 Terabytes or so, at least theoretically, but most workstation boards aren’t designed to come anywhere near that. The reality is that the cost of building a wide-address board is too prohibitive for most desktops (server boards often have much wider RAM options). In my case the maximum practical RAM is 8 GB (more than enough for me to do anything I could dream of doing). The technical lecture aside, though the memory mapping function in the BIOS on most boards like this can be called a pain in the proverbial arse, since when it is enabled to allow the 64-bit OS maximum breathing room, the 32-bit Windows versions will be dropped from 3 GB of usable memory to 2 GB. In itself that isn’t bad, per se, but it is a technical limitation that has no foundation in necessity – there isn’t a real defensible reason not to expose the whole RAM configuration to the OS and let it do whatever the hell it pleases, ignoring it as necessary. Having that setting is just an irritation for folks who will make the 64-bit transition.

After enabling memory mapping the OS saw its 4 GB spread, and was happier; and I can only imagine it will be much happier when I maximise its breathing space. I run several Virtual Machine (VM) sets and this extra RAM allows me to run them simultaneously without degrading host performance at all.

Now, for the impressions:

  • Windows 7 is faster than its predecessor;
  • Windows 7 is cleaner than its predecessor; and
  • 64-bit Windows is a much better experience than 32-bit Windows, or at least feels more responsive on my hardware.

Overall, this is the best OS MS has released in 10 years, at least, and this is a statement from someone who would swear by a well-managed Windows Server ever since it was called by that appellation. That said, thee are some distinct negatives to note:

  • Some people will hate the new bottom taskbar interface, with its jump lists and such. You get used to it, but overall it is a pain to deal with initially. What is particularly jarring is that the visual differentiation between active programs and shortcuts is too subtle. You tend to initially spend a lot of time trying to figure out if you already launched the damn programs. That last a good few days, but once the light bulb goes off the transition comes fast. Still, MS should have considered a tutorial in the OS about the taskbar, given its massive overhaul.
  • I hate Windows Explorer (since Vista, really). The problem with it isn’t its look and feel (it’s chunky and hard to navigate around), but the absence of a “rooted view.” In XP I used to install a registry hack that would root a folder, making it possible to click a folder (Setup, perhaps) and “Explore from here.” The folder list then treated the folder as the root of the tree, and you could focus. The new navigation pane on the left always shows all folders, and the massive number of them makes dragging and organising files almost impossible. Maybe the feature is still hidden deep in the OS, but I’ll be damned if I can find it, and losing it is a productivity nightmare when you deal with large caches of files (like code libraries).
  • The last annoyance is how the new OS treats “hidden files.” Back in the XP era I could do something sneaking in my Programs folder (off the start button, which is now an orb). If you didn’t like the way an installer flung crap around in there, you could simply mark the folders and icons as hidden. Even if your OS was set to show you hidden files, the menu didn’t. In essence, you could rearrange to your hearts content without some installer buggering up because it thought a shortcut was missing (going into repair hell). This feature is gone, and in a sloppy world is sorely missed.

By the way, my performance index on this box (the hard drives are not the fastest on the face of the earth) rose to 6 just by turning on memory mapping. That’s meaningless in real terms, but it was nice to see the indexing system they used was thoughtful enough to revise based upon getting the extra GB of RAM to play with.

Applications…and Hell…and More Applications From Hell

I’m not a religious man, but I would like to think my curses on the people who build application installs at least make them go prematurely bald. because the OS was a fresh install, I had to reinstall my working set of applications, since I intend to stay with Windows 7 as my primary functional OS now. The list was long, and specific to my work in many ways, and…I quickly saw a clean OS turn into a hellish mash of crap (though it still runs better than XP ever did). This section is just gripes, with some observations:

  • AVG Anti-Virus: excellent utility, blistering decent pace, and a good installer. It put one folder in the menu, and asked at that, and even asked if I wanted to have a desktop icon (I said no). This was a good install…but it raised a point for me that I’ll jot here: Why do these installers not all ask these questions, and why, even still, are we still in the era where it is nearly impossible to avoid menus just being flung into the main one? Even AVG ended up as a menu in the main programs group, and frankly I prefer it to be in Accessories/System Tools/AVG where it belongs. (Why, you may wonder? Well, think of it this way. Like many such applications it sits in the notification tray and is fully accessible from there, so I never seek it in the menu unless something is horribly amiss. By sticking it in the programs folder direct, it ends up bloating that menu unnecessarily. It’s my machine; make it my choice.) Still, I’m not knocking AVG here, just observing even a good install can wreck a neat menu.
  • Windows Live (the messenger, blog writer I’m using now, photo gallery, etc.): A neat getting started menu off the main menu suggests these applications, and I installed the trio of ones that are deadly handy. Minimal fuss, a pleasant install, and good functionality for the fact they are free. No complaints on this one, though, again, Messenger will flutter into the damn taskbar now rather than the notification bar, and it’s annoying. Also, let me put the folder where I want it…easily.
  • Firefox (latest release): Backed up my configuration using an add-on in the XP partition, installed in the new one, installed that add-on (FEBE, for those who care), and let it restore everything. Perfect installer, perfect configuration approach, and it would be given the gold star but for its instance of jamming itself in a folder off the root. But, I renamed it Browsers and tossed the IE 8 shortcuts in there, then added Firefox to my taskbar. As easy as kiss my hand, I was back online properly – MS needs to take a lesson from Firefox as to configuration. Mind, IE 8 is a good, possibly great, browser; but Firefox is slicker.
  • Google Chat: Another decent install, though in this day and age…seriously, an uninstall icon? The OS has a gadget to uninstall junk. Quit with the extraneous icons! As well, let me put Google Chat in my Communications folder. I like it there for a reason, because again this applet sits in the notification tray. I can use it from there, without my main menu being sloppier.
  • Paint.NET (latest release): Easiest install of all time, adds one shortcut in the root menu, and bows away gracefully. This is a free graphics editor that is highly recommended. It doesn’t even get a grunt of displeasure.

I’ll leave the other utilities aside for now, and say that they all need better installers. Let me be in charge.

At this point, anyone who is still reading just knows I’m getting to something….

Let me preface this next section by saying I’m a developer, full time, and my clients are Windows users, so I am. I have no hate on for open source products, or Linux, or anything of the sort; I’m just bound to the environment my clients want, since they pay the bills. Consequently, since it feeds me, I am a “MS guy” in the sense that I use their tools, eat my own dog food so to speak (write my own utilities), and am bound by existing projects to some oddball configuration needs. You know this can’t go anywhere pleasant….

  • SQL Server Compact Edition: There’s a 64-bit version of this, and I tried to install it; it promptly informed me it required me to install the 32-bit version first. Now, I need this thing for work (on handheld components), so I did as it asked, but…what the hell is wrong with whomever built the 64-bit installer? If there’s a dependency, so be it, but bind the installer with all its dependencies. Then do a check, and if its there, skip to the butt end of the process. This kind of asinine oversight is the same as when I dial a phone lately. I dial ten numbers, and it says, “the number you’re calling is long distance and requires you to dial a one before it.” Okay, fair enough, but since you know this, machine, just do it! Same with failing to dial all ten, and going for the old 7-digit dial. It tells me this local number needs me to dial 403. If you know this, just do it! And if you know your installer will bitch and force the user to install another package first, just bind it and do it for them. It’s annoying.

And here we roam into the most bizarre adventure I had. To log onto MSDN and download the package I needed (no big deal), I launched IE since the download manager off MSDN needs that browser to work well. And I found out MSDN tanks with a 64-bit browser (the download manager is 32-bits). I had to manually launch the 32-bit IE (64-bit Windows has it, too). No big deal, still, but any website that needs a specific bit-width browser is being ridiculous. The install went fine once I got the bits downloaded.

  • SQL Server 2008 Enterprise Edition: There’s a 64-bit version of this engine, and I went for it. (Most client side tools are 32-bit, making for a sloppy directory structure.) A long install. but flawless except for the four thousand menu items it felt necessary. And here I come to my next gripe about menu folders. I know I just installed “Microsoft SQL Server 2008.” There is no need to jam Microsoft ahead of the SQL Server bit, or even jam 2008 after, really. And if you must, then you go with a folder structure like Microsoft/SQL Server/2008/etc. Make my menu smaller; and stop making every shortcut contain your corporate name! It’s annoying, and hard to read, and unnecessary. At least, if you must go there, give me a choice to eliminate the damn excess – and then respect my changes when I update the installs. If I rename “Microsoft SQL Server Studio” to “SQL Studio,” when I install the next Service Pack, is it really necessary to jam in a duplicate shortcut with the long name? I know the argument here is simple, and technical, but at this juncture an OS should know the shortcut by a Globally Unique Identifier (GUID). My choices should be respected, and that GUID can handle the installer duties adroitly. Excepting that annoyance, the Service Pack went on neatly, and the Books Online update did the same. 64-bit SQL Server is faster, and better than the 32-bit version. Kudos to the team.

So far, so good, right? Yeah, well, the devil’s own satanic herd of sodomites was lurking unbeknownst to me, the innocent MS guy.

  • Outlook 2003: I own several versions of Office, and never saw the need to upgrade Outlook past the 2003 version. So, I install it every time I rebuild. And…I bitch about how awkward the install is. Then I bitch because the settings files never quite return to life, and I have to rebuild them. The folders are fine, but all considered this is one of those stupid installers. It throws junk in fifty-seven different directories (literally; I watched it), installs bits you explicitly say not to, and then creates at least six folders that are empty. They remain empty, and make the Windows Explorer navigation panel harder to use. And, of course, the application always wants to smack in data files where it wishes them, making it feel like the entire data structure model was designed by a retarded chimpanzee. A sloppy installer; not a pleasure; a sign of things yet to come.
  • Office 2007 (Word, PowerPoint, Excel, and OneNote; I don’t need the rest): If the Office 2003 installer is a vicious baboon, the Office 2007 one is an asteroid the size of Earth hurtling directly down to smash into the groins of all living things…at light speed. Aside from the over one hundred folders it flings around, it also pulls a billion pounds of updates (larger than the entire install set at this point by about 20%). And then it commits murder on the menu, by insisting everything is in “Microsoft Office 2007,” and “Microsoft Word 2007,” or “Microsoft Excel 2007.” It tops it off by putting “Microsoft Office Tools” inside the first folder, and dropping in a few more “Microsoft” prefixed shortcuts in there. I arbitrarily shorten these later to “Office,” containing “Word,” “Excel;,” etc. and even make the sub-folder into the neatly named “Tools.” I know this is a small gripe, but the OS has to start enforcing rational thinking if the vendors won’t do it themselves. On my very wide display the names of these shortcuts get attenuated and end up with a trailing ellipsis. Why go to that bother when the solution is to be rational with the shortest names possible? (And since the hidden file trick no longer works, future serve packs will rename my choices.) The products are good; why isn’t the process? And to whomever decided the settings wizard was to be dropped for the 2007 edition, a pox on your house! It took two-and-a-half hours to get Office restored as I like it. (yes, I know the OS File Settings wizard might have worked, but I was testing a theory of mine.)

And there is indeed more pain on the horizon. If you’re still reading, you know you’re bored.

  • Visual Studio 2008: I need this tool, so I install it (and its blasted service packs). It’s another product that loves long names, and long folder names. Really, would it be so hard to have a folder like Microsoft\Visual Studio\2008\etc.? Or better yet let me name my shortcuts…like…oh…VS 2008, in the Development folder? This install was painful, but went smoothly overall; and kudos to those involved.
  • Visio Enterprise Architects Edition (2007, but the regular 2007 lacks the drivers necessary to do what I do): I use this for database modelling discussions. It’s handy; but its tied to VS 2005, and since I refuse to install that for this, I end up having to hack in a fix. MS…you gave me the product, let me use it without hacking at it! It’s stupid and unnecessary, and this brings me to my next universal gripe: the OS needs to evolve to solve this kind of horseshit tying. Something to store all keys, save them in a portable file, and make them hook to a single user private key…should allow the OS to activate and restore the settings to any application that complies with the rules.

And now we come to the topper, which is about OS transitions, and about realities:

  • For my legacy applications I need Visual Studio .NET 2003. It’s a requirement, since some folks will not pay to have the code bases updated when the application functions as desired. Vista killed the VS 2003 product because the debugger got buggered; Windows 7 is the same. Now, that’s fine; that’s acceptable transitional progress. But why is it so damn hard to install VS 2003 in a Virtual Machine running a copy of Windows XP SP3, 32-bit version? Six hours, and three tries…and finally a functional VS 2003 in a VM. Unacceptable only because the problems were avoidable, and focused around strange quirks like setup failing due to long path names because of network shares. In a 64-bit host system, this should be avoidable; in a well-designed VM it should be easily rectified. Of all the installs, this was the most wickedly damaging, because to even install a development tool (and that’s all) I had to install web services (though I didn’t need them in the VM), extensions the tool doesn’t even use, and jump through flaming hoops to get anything to work. (XP Mode in VM settings is nice, though.) Still, six hours? It was a punishing process after a smooth OS install. And…ultimately, all because the upgrade path doesn’t exist.

Last Thoughts

Windows 7 is good, capable, and solid; but the absence of an XP upgrade path, and the complications of rebuilding a workstation from scratch, will hinder its uptake except on new boxes. That’s a shame, and could have been solved so easily.

Final Advice for Anyone Needing VS 2003 in a VM

  • Beware you need to update the XP Mode image Windows 7 uses to contain IIS and the FrontPage Server Extensions before launching the installer. It will choke otherwise.
  • Beware you need to move the installers et to a local folder, or map to a drive, to shorten the paths, It will choke otherwise.
  • Beware you cannot develop mobile products on the emulated VM, because an emulator cannot run inside an emulator. Sensible, but problematic if you have old CE handheld code.
  • You can access the host web server if you pull a fast one:
    • Set the host IIS (Internet Information Server) to bind (www.mySite.com for example);
    • Set the host to have a static IP;
    • Edit the VM hosts file (system32/drivers/etc/hosts) to point the static IP at the pretend host name (192.168.2.2 www.mySite.com, for example); and
    • from that point you can browse the host Internet Information Server for development purposes.
  • You can also configure IIS 7 under Windows 7 to run ASP.NET 1.1 applications if you wish, and configure FrontPage Extensions to the IIS 7 environment. With some tweaking you can even debug remotely against it from the VM.

Ciao for now. The next posts will be very, very short.