Saturday, July 10, 2010

Access 2003 Runtime vs Win 7 and Office 2007

One of the beauties of taking on a new client at work, can be the legacy environment you inherit when you start. In this case, I had a customer who we were providing brand new infrastructure for (new server, several new worksations and a new SOE). As part of that process, we made the transition from Windows XP to Windows 7, and Office 2003 to Office 2007.

I did due dilligence and checked up on their workflows, and apart from the obvious bout of training on how to use the new versions of the products, all looked like it was going to be reasonably smooth. They had a Line of Business custom app which was written with Access 2003 in mind, however after reading up on Sandboxing, I figured I could get it going no problems. My internal testing seemed to indicate the App ran as expected, and unfortunately as they were located in another state, my UAT was somewhat limited to "Does the app load, and look normal", which I concluded was yes.

Long story short, did the rollout and the customer was very happy with the results.

However, a few weeks after the fact, when the client had a chance to settle in, and get back to normal operations, I was informed that a few functions within the LOB app were not working as expected, namely Invoice Generation and Date Field entry (strange I know, but it hadn't been noticed till that point).

At this point, naturally you get back in contact with the developer, however as is often the case with these custom apps, they had long since moved on from the original product and had never intended the application to be run on this platform. The developer did mention that there were problems with references when going from 2003 to 2007, especially when installed on the same machine, and particular problems around Sandboxing on Win Vista++.

By this stage, I had already figured out that in order for the App to work as I was expecting, I needed to Add/Modify the following keys:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines]
"SandBoxMode"=dword:00000002

and

[HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\Access\Security]
"Level"=dword:00000001
I had to do this, to get the App to properly launch (as it was not digitally signed) in the first place.
When I first heard about the problem, I jumped onto a reference computer, and spent hours trying to figure out what tweak was required to get these references correct. As you can imagine, it's a difficult term to search for, and I got a great deal of responses bemoaning a migration from XP->Vista, or 2003->2007 but not a great deal of help. After a few hours of tinkering, I resigned myself to wait for a call from the developer to see if we could get this sorted out.
Lo and behold, about a week later, the client called me to let me know that the reference machine was working exactly as expected, and to thank me for what I had done. Problem was, I know it wasn't working when I left it that night!
Another few hours doing Registry Diff's, and checking for any custom config that had occurred, the only thing I could note was a difference in file versions for Access 2003 on the workstation. Eventually it dawned on me, Ofice 2003 SP3 had applied, even though I was only running the Access 2003 runtime. A test run on another machine in the office, and I could confirm that the app was working exactly as expected.
I'm not 100% certain what the Service Pack took care of, but I know the list of fixes is huge. My advice to anyone experiencing a problem porting a 2003 app to Windows 7/Office 2007 is to check your service packs (and note the sandboxing/security settings above) and you should be all good.

No comments: