Udostępnij za pośrednictwem


What version is installed again? (Part 2)

In my last post I showed how the Microsoft Dynamics CRM build number can be displayed on the desktop of the CRM application server. At the end of the post I mentioned the draw-back of the approach is that you must know the revision number that represents each rollup.

So in this post I will demonstrate a simple solution to display a more user friendly version number using BgInfo.

The best way to know which version is installed is to query the buildversion table in the CRM database. This table holds the major, minor and revision numbers of the installed version of CRM. In order to access this information I wrote a simple command line application that gets the SQL connection string to the SQL server where the CRM database is and queries the buildversion table to retreive the major, minor and revision number and provide a user friendly description of the current CRM version.

You can place this console application in the startup folder so that it runs when the user logs onto the Server console. The application can write the user friendly CRM version to a file or to an environment variable which can be read by BgInfo. In order for this to work the user logging on needs to have the privledges to read the CRM database, registry keys on the server and be able to set system environment variables on the server.

The command line application has the following options:

getcrm4rollup.exe /f <filename>

Writes the output to the specified file.

getcrm4rollup.exe

Writes the output to the console.

getcrm4rollup.exe /e <environment variable name>

Writes the output to the specified system environment variable.

getcrm4rollup.exe <anything else>

Displays the usage information.

Here is how to set it up:

1) Download the getcrm4rollup.exe from my blog and copy it to a location on your CRM server. Open a command window and run the application to test it. In the command window type: "getcrm4rollup.exe /e crmrollup". If there are no errors check the system environment variables. You should see an environment variable with the user friendly version description.

Step1

2) Create a new shortcut to the getcrm4rollup.exe by right clicking on the exe file and selecting create shortcut.

3) Right click the newly created shortcut and add the following to the end of the "start in" text box. Add: " /e crmrollup" (don't forget to leave a space before the /). This tells the application to write the output to an environment variable called crmrollup.

Step3

4) Move the shortcut to the startup folder. Click start->All Programs and right click on "Startup" select "open" from the context menu. Move the new shortcut you created in step 3 into this folder.

Step 4

5) Add a custom field to BgInfo. Open BgInfo by double clicking on the BgInfo.exe application. In the main BgInfo application window click the "custom" button.

Step 5

6) Click the "new" button in the "user defined fields" dialog window.

Step 6

7) Enter "CRM Version" as the identifier and select the "environment variable" radio button and enter "crmrollup" as the path in the "define new field" dialog window. Click ok to close the window.

Step 7

8) Confirm that the new custom field is present in the "user defined fields" window. Click "OK" to close the window.

Step 8

9) Add the new custom field to the field list by selecting the "CRM Version" field and clicking the add button.

Step 9

10) Once the field is added click the "OK" button on the main window.

Step 10

11) Now you should see a user friendly CRM version each time you logon to the Server Console!

Step 11

 

 

GetCRM4RollUp.exe

Comments