Monday, April 8, 2013

Dynamics GP 2013 Service Pack error


The Problem
Here’s the scenario. You have just installed a service pack. When you launch GP 2013, you are told you need to run Utilities. You launch Utilities, but oddly, it doesn’t find an existing instance of GP 2013. So, you just hit next and it moves along. Suddenly, the error pop’s up telling you:
“A system database name was not supplied. Run a repair of the Microsoft Dynamics GP installation”

system database not found

The fact that it was trying to create a new system database makes a little more sense now. Next, you dutifully launch Control Panel and begin to run the Repair routine. Right at the beginning of the Repair process you get another error:

           “Object reference not set to an instance of an object”

object reference not set

Fabulous, you’ve seen this error before and it’s never pretty. We used to see it using Integration Manager and it was sometimes hard to fix. You’ll be delighted to know that this is a known error with an easy fix.

This situation comes up if you install the same service pack twice. The first time you install it, everything works perfectly, when you re-install, it you have the above problems.

The Solution
The fix for this is explained by Sara Purdy on the Microsoft Dynamics GP Support and Services Blog. Always go there first if you have any problems in Dynamics GP, there you will find some really exceptional advice.

The actual posting is called (deep breath here) Microsoft Dynamics GP 2013 .MSP Patch Files Removing Information from Dex.ini and Registry.
All of the meaty solution information below was lifted directly from Sara’s  post. I’ve added some editorial comments for those of us (like me) who may need just a little more information to pull this off.

The culprit, as identified by Sara Purdy.

We have identified an issue with Microsoft Dynamics GP 2013 where the .msp files are removing registry entries and part of the Pathname= line in the Dex.ini when you RE-APPLY a patch. The first install of the patch works fine. The issue comes into play if you reapply the patch again on either a single instance or multi-instance. The Country and System Database Name get blanked out in the registry. The Pathname= line in the Dex.ini gets modified.

Here's the registry path:

HKLM\SOFTWARE\Wow6432Node\Microsoft\Business Solutions\Great Plains\v 12.0\1033\DEFAULT\SETUP

Bad: The broken Registry looks like this:
registry

Good: The Fixed Registry looks like this:
fixed registry

Bad: The Dex.ini file looks like this:
dexini

Good: The fixed Dex.ini file looks like this:
fixed ini

Of course, you will use the name of your system database, whatever it is. Yours will look like this: Pathname=your_system_database/dbo/

After you fix the registry and your Dex.ini file, you will need to re-apply the service pack. This, you have to do from the command line (what fun!).

The Second part of the Solution:
These are the instructions from Sarah Purdy’s post:

The current workaround when re-applying the .msp to a specific instance of GP 2013 is to do the following:

1. Click Start, click Run, type regedit, and then click OK.

2. Locate and then click the following registry subkey:
Microsoft Dynamics GP 10.0 and later versions

32-bit environment

    HKEY_LOCAL_MACHINE\Software\Microsoft\Business Solutions\Great Plains\V12.0\1033\your_instance_name\SETUP

64-bit environment

   HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\
Business Solutions\Great Plains\V12.0\1033\your_instance_name\SETUP

3. Expand the folder for the instance of Microsoft Dynamics GP you want to patch.

Note The DEFAULT folder is for the default installation. Replace V12.0 with your version of GP. The Inst01 folder is for the second instance of Microsoft Dynamics GP. For example, if you want to patch the second installation, expand the Inst01 folder.

4. Click the SETUP folder, double-click the Product Code, and then copy the Value data field’s value.

5. Exit Registry Editor.

6. Open up a Command Prompt by right-clicking on it and selecting Run As Administrator.

7. To install the .MSP file, type the following, and then hit Enter.


C:\updatename.msp /n {E979C594-95F9-4E3A-985D-A1DFDF403227}

(You can ‘Paste’ in the command line screen by right clicking next to where you want the data, and then choose ‘Paste’)

Note: Replace "C:\updatename.msp" with the path to the .MSP file and the name of the .MSP patch file. Replace "{E979C594-95F9-4E3A-985D-A1DFDF403227}" with the ProductCode value that you copied in step 4.

The registry will look like this for GP2013:

registry for gp2013 service pack error

The current workaround when re-applying the .msp to all instances of GP 2013 on a machine is to do the following:

1. Open up a Command Prompt by right-clicking on it and selecting Run As Administrator, type in the following, and then hit Enter.


    msiexec.exe /p C:\updatename.msp


Note: Replace C:\updatename.msp with the path to your .MSP file and the name of the .MSP patch file.

Example:
msiexec.exe /p C:\ MicrosoftDynamicsgp12-kb2799678-ENU.msp


2. Click OK.

Until next post!

Leslie

No comments: