/build/static/layout/Breadcrumb_cap_w.png

Microsoft Dynamics CRM

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login
Views: 6.2k  |  Created: 04/15/2008

Average Rating: 0
Dynamics CRM has 2 inventory records, 2 Questions, 0 Blogs and 0 links. Please help add to this by sharing more!

Deployment Tips (5)

Most Common Setup Type
Not Determined
Average Package Difficulty Rating
Rated 0 / 5 (Not Rated) based on 0 ratings
Most Commonly Reported Deployment Method
Not Determined
126
Note
Prepare installation as described in Microsoft documentation:
http://www.microsoft.com/downloads/details.aspx?FamilyId=1CEB5E01-DE9F-48C0-8CE2-51633EBF4714&displaylang=en

However, there's a few issues not mentioned:

Automated CRM Client installation must be done in two steps:

STEP 1.
Install client. Easily done by running "clientsetup.exe /q" from source root.

Remark 1: INSTALLLEVEL=2 is default and does not need to be specified. INSTALLLEVEL=3 (offline version) does not work properly when run silent...

Remark 2: The /targetdir swtich does not handle spaces, and is therefore totally useless. Luckily, not specifying it sends the program to default location; "c:\Program Files\Microsoft Dynamics CRM" wich is appropriate for most organizations.


STEP 2.
Run automatic configuration:

1. ClientConfig.xml - file must be created as described by MS. Then it must be placed centrally available or copied to users PC.

2. Run "C:\Program Files\Microsoft Dynamics CRM\Client\ConfigWizard\Microsoft.Crm.Client.Config.exe /q /config ClientConfig.xml"
(Specify full path to ClientConfig.xml if not copied to the path of config.exe)

Issue!: The CRM client installation is NOT finished when clientsetup.exe closes (clever!) so if you distribute by for example SMS you must get the distribution to wait at least 30 seconds after clientseteup.exe finishes before you run the config.

I have solved this through a AutoIt script, wich also prompts the user to close Outlook if running, but there's of course several solutions to this issue.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
5
Note
I have a full working installation /upgrade script that I want to make public.

here's a few problems that will arise when packaging CRM4.

1) upgrade you have light & fat client of CRM3. The fat client has the SQL DB behind it.
2) the user needs to have admin rights to install CRM3 under the user context. Removal also requires this admin rights. CRM4 Can be installed under any admin account and the configuration has to be done again under the user account, but here the user doesn't require admin rights.
This is not that easy for any software distribution mechanism, so I opted for logonscript based Software distribution(CRM3 was installed via logonscript).

The script accepts a whole bunch of switches:
/u /uninstall /x /remove
/sp to pre-install only the Service pack 3 for MS Office
/dotnet to pre-install only Dotnet
/cleanup to cleanup logfiles
/encrypt to encrypt your site admin password in the config.ini file (will be decrypted on the fly)

During the parts where it causes the installer to fail I added a feature that checks every few milliseconds if the process outlook.exe exists. if so, it closes it immediately and notifies the user that he shouldn't touch outlook at that moment.

The zip file I placed on megaupload.com (I didn't find the correct place to store this)

it only contains a BMP I ripped from CRM4 help/about (users want to see something during installation, hey who cares)
a config.ini file that you can use
and the actual installation script (without references to my company. Every step of the installation is written in separate functions so you can recycle what you want :)

http://www.megaupload.com/?d=2HDXJIFC

I hope someone finds it usefull :)
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
4
Note
Upgrading from CRM Outlook client 3.0 to 4.0 is not supported as an automated process anywhere I can find. The downloadable documentation is incorrect in several areas regarding installing and especially configuring the user.

I explain my process here.

Applogies for long post but its not a simple product

A machine based SMS package that:

Puts all the installs locally (c:\windows\temp\crm4) %windir%

Sets an Active Setup job that runs for each user who logs in

That is the end of the SMS side. From here on its all about the Active Setup script I've created which does the rest of the work. What does this script do?



It creates logs and sets a flag file for itself so once it fully runs it creates that flag meaning it will not run again (unless the flag is removed). The basics are set.

OK Because this runs for each user it needs to find only the user that had 3.0 installed and ignore all others (this is an upgrade not an install package the install only is easy and will come from this package).


1 Check to see if the previous user was the one that installed 3.0. In this org all previous 3.0 installs where manual and where installed as the user as an admin (you may not be so "lucky").



This is autoit checking a reg value. If it is "Microsoft CRM..." then it does nothing otherwise it logs that this is not the 3.0 installed user and exits.



$LogFile = "c:\temp\CRM4.0_Main.log"



$CheckReg = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Installer\Products\225EB7AC620858E44A23C1E96BCBCF00","ProductName")
If $CheckReg = "Microsoft CRM desktop client for Microsoft Office Outlook" Then
Else
_FileWriteLog($LogFile"This user " & @Username & " did not have CRM 3.0 installed existing")
Exit
EndIf



2 OK at this point we have the 3.0 installed user now we need to know that that user is a local admin (ow well)

If they are a local admin do nothing otherwise log it centrally to a share and exit (so we can sort them later). Note you may get away with Group Policy MSI's run elevated at least for the uninstall.



$NoAdminLog = "\\server\share\CRM4_NOADMIN\" & @ComputerName & ".txt"



If IsAdmin() Then
Else
_FileWriteLog($LogFile,"User:" & @UserName & " On Computer:" & @ComputerName & " requires the CRM 4.0 upgrade but is not a local administrator exiting")
RunWait("cmd /c echo User:" & @UserName & " On Computer:" & @ComputerName & " requires the CRM 4.0 upgrade but is not a local administrator >>" & $NoAdminLog,@TempDir,@SW_HIDE)
Exit
EndIf



3 Give we are running as Active Setup we know Outlook etc are not open so we dont need to close them

This is all happening just after a user logs in and before their full shell loads (no start menu etc).



Remove the old 3.0 client as the previously installed user who we know is a local admin



RunWait("cmd /c msiexec /x{CA7BE522-8026-4E85-A432-1C9EB6BCFC00} /qn /l " & chr(34) & "c:\temp\uninstCRM3.0.txt" & chr(34),@TempDir,@SW_HIDE)



This seems to work fine. Still as shown above even the CRM types find this unreliable. Given we are running it before full windows loads, nothing else is open, the user is not doing things and we know they are a local admin this is as reliable as we can expect to get it. Piloting will tell if its good enough which is coming this week.



So far I've found this 100% on my test accounts which are not exactly a 3.0 user who's been using the app for 6 months so it could well have issues in prod (in which case I will dig out the pst and address book myself).



I put breaks in to parse the log file for each stage and not continue until it is complete. The CRM installs are so poorly written they exit back to the calling script before they complete.



$x = 1
While $x = 1
$FileContents = FileRead("c:\temp\uninstCRM3.0.txt")
If StringInStr($FileContents,"=== Logging stopped:") Then
$x = 2
Else
sleep(5000)
EndIf
WEnd



4 Do an admin install of CRM Outlook 4.0. This does the install but does not configure it for anyone.


RunWait(@ScriptDir & "\SetupClient.exe /q /targetdir " & chr(34) & "c:\Program Files\Microsoft CRM" & chr(34) & " INSTALLLEVEL=2 /l c:\Temp\CRM_Admin.txt",@TempDir)



This install learnt nothing much from 3.0 and runs on minutes before it completes. So we compensate for it.



While $x = 1
$FileContents = FileRead("c:\Temp\CRM_Admin.txt")

If StringInStr($FileContents,"=== Logging stopped:") Then
$x = 2
Else
sleep(5000)
EndIf
WEnd
sleep(5000) ; Extra small delay



5 And finally we configure CRM 4.0 for the same user, this is testing fine.



RunWait(chr(34) & "C:\Program Files\Microsoft CRM\Client\ConfigWizard\Microsoft.Crm.Client.Config.exe" & chr(34) & " /Q /config c:\Windows\temp\crm4\TEC_Client.xml /l c:\temp\CRM4UserConfig_" & @UserName & ".txt",@TempDir)



Note the TEC_Client.xml is configured in one of the early posts.



So what do we have?



We have SMS just dump down the installs and config files and then use MS built in Active Setup to run a script once for each user who logs into the computer (this is built in MS ability).



Then the next time a user logs in we check in the REG to see if they have 3.0 installed as them.

If so we make sure they are a local admin

If so we uninstall 3.0 as them

Install 4.0 as them (but for all users just unconfigured for any user)

Last we configure CRM 4.0 for that same user



The full script contains a lot more logging, flag files etc. If you dont currently use AutoIT and you are trying to automate Vendor abandend applications like this its time you started.



;Contents of the REG file used in Script 1-------------------



Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\UpgradeCRM3-to-4]
"Version"="1"
"StubPath"="c:\\windows\\Temp\\CRM4\\CRM4UpgradeActSet.exe"
"Vendor"="Scripting IT LTD - Bruce Taylor - 021 966 844"



;Contents of the XML file used in Script 2-------------------

<CRMConfiguration>
<Client>
<ServerUrl Type="OnPremise">http://crmserver</ServerUrl>
<Organization>YourCompanyNoSpacesHere</Organization>
<CEIP optin="true" />
</Client>
</CRMConfiguration>

;Script one the install / provisioning script ---------------

; ---=== Scripting IT LTD ===---
;
; Provision a machine to upgrade CRM Outlook 3.0 to 4.0.
;



#Include <Date.au3>



If FileExists(@WindowsDir & "\temp\CRM4PackageRun.txt") Then
RunWait("cmd /c echo Ran again " & _Now() & " no action taken as this file exists >> " & @WindowsDir & "\temp\CRM4PackageRun.txt",@TempDir,@SW_HIDE)
MsgBox(0,"Exit","CRM4 install has already run previously exiting",3)
Exit
EndIf

If FileExists("c:\temp\uninstCRM3.0.txt") Then
MsgBox(0,"Exit","CRM3 uninstall has already run previously exiting",3)
RunWait("cmd /c echo c:\temp\uninstCRM3.0.txt exists uninstall must have run outside SMS " & _Now() & " no action taken as this file exists >> " & @WindowsDir & "\temp\CRM4PackageRun.txt",@TempDir,@SW_HIDE)
Exit
EndIf

DirCopy(@ScriptDir,@WindowsDir & "\Temp\CRM4",1)
RunWait("cmd /c reg IMPORT c:\windows\temp\CRM4\CRM3-to4.reg",@TempDir,@SW_HIDE)





;Script two the active setup user upgrade script ------------

#Include <Date.au3>
#include <file.au3>

;Create Temp
DirCreate("c:\temp")


$NoAdminLog = "\\server\audit$\CRM4\" & @ComputerName & ".txt"
$LogFile = "c:\temp\CRM4.0_Main.log"

_FileWriteLog($LogFile,"_____________Started" & _Now() & "_____________")

; Check for the previously run (or dont run) flag file if it exists then exit

_FileWriteLog($LogFile,"Check if flag file " & @WindowsDir & "\temp\CRM4Installed.txt Exists (is so exit install ran already)")
If FileExists(@WindowsDir & "\temp\CRM4Installed.txt") Then Exit

; See is the current user has had CRM 3.0 installed for them and if not exit
$CheckReg = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Installer\Products\225EB7AC620858E44A23C1E96BCBCF00","ProductName")
If $CheckReg = "Microsoft CRM desktop client for Microsoft Office Outlook" Then
Else
_FileWriteLog($LogFile,@WindowsDir & "\temp\CRM4Installed.txt exits install already ran exit")
Exit
EndIf

; If the user has 3.0 installed check they are a local admin (if not create a log and exit)
If IsAdmin() Then
Else
_FileWriteLog($LogFile,"User:" & @UserName & " On Computer:" & @ComputerName & " requires the CRM 4.0 upgrade but is not a local administrator exiting")
RunWait("cmd /c echo User:" & @UserName & " On Computer:" & @ComputerName & " requires the CRM 4.0 upgrade but is not a local administrator >>" & $NoAdminLog,@TempDir,@SW_HIDE)
Exit
EndIf

; If we get to here then the user has 3.0 installed and they are a local administrator so they need to be upgraded


;Kill Outlook if it is running
_FileWriteLog($LogFile,"Stopping Outlook Process")
ProcessClose("Outlook.exe")

; Remove the old client
_FileWriteLog($LogFile,"Kick off CRM 3.0 uninstall")
RunWait("cmd /c msiexec /x{CA7BE522-8026-4E85-A432-1C9EB6BCFC00} /qn /l " & chr(34) & "c:\temp\uninstCRM3.0.txt" & chr(34),@TempDir,@SW_HIDE)

_FileWriteLog($LogFile,"Wait for 3.0 remove to finish - loop below")
; Wait for remove to complete *(this runs on so monitor log file till it is finished)
$x = 1
While $x = 1
$FileContents = FileRead("c:\temp\uninstCRM3.0.txt")
If StringInStr($FileContents,"=== Logging stopped:") Then
$x = 2
Else
sleep(5000)
EndIf
WEnd
sleep(4000) ;Extra small delay
_FileWriteLog($LogFile,"3.0 remove complete (find === Logging stopped: in c:\temp\uninstCRM3.0.txt)")

;Install the 4.0 client
_FileWriteLog($LogFile,"Begin install of 4.0 admin install")
RunWait(@ScriptDir & "\SetupClient.exe /q /targetdir " & chr(34) & "c:\Program Files\Microsoft CRM" & chr(34) & " INSTALLLEVEL=2 /l c:\Temp\CRM_Admin.txt",@TempDir)

; Wait for install to complete *(this runs on so monitor log file till it is finished)

_FileWriteLog($LogFile,"wait for 4.0 install to finish (find === Logging stopped: in c:\Temp\CRM_Admin.txt")
$x = 1
While $x = 1
$FileContents = FileRead("c:\Temp\CRM_Admin.txt")

If StringInStr($FileContents,"=== Logging stopped:") Then
$x = 2
Else
sleep(5000)
EndIf
WEnd
sleep(5000) ; Extra small delay

_FileWriteLog($LogFile,"Configure CRM 4.0 for the given user")


RunWait(chr(34) & "C:\Program Files\Microsoft CRM\Client\ConfigWizard\Microsoft.Crm.Client.Config.exe" & chr(34) & " /Q /config c:\Windows\temp\crm4\TEC_Client.xml /l c:\temp\CRM4UserConfig_" & @UserName & ".txt",@TempDir)

Sleep(5000)

RunWait("cmd /c echo User:" & @UserName & " On Computer:" & @ComputerName & " installed CRM_Outlook_4.0 at " & _Now() & " >>" & @WindowsDir & "\temp\CRM4Installed.txt",@TempDir,@SW_HIDE)

_FileWriteLog($LogFile,"Finished!")



;------------------------------------- finish



Some final notes this is not offline / laptop type install (thank the gods looking at that one).



you need to create the client install directory as shown in the documents



FROM THE CRM CD (ISO)



Copy \Client somewhere

Copy the contents of \Redist\i386 to \Client



You can remove SQL, dotNetFX if you are not running offline install (same as me above) this takes the install from 300+ meg to like 70 meg.



You need to compile the two scripts above (download autoit, edit them, change as you like and compile) and put them both in \Client.



SMS can then run CRM4_Provision.exe which sets up the machine

You should be able to then log into the machine as a 3.0 setup user and have them become a 4.0 setup user before they see their start menu (they do get a slow logon first time around so I'll be putting up a message for them once I am done).



This all just worked nicely for me three times in a row. However all those times I reverted my VMware client to a clean state, installed the 3.0 client fully with its three rollups in order. Opened outlook and poked about CRM for a moment, then ran the update from SMS and finally logged out and in as the 3.0 user. I have more testing to do but its is a very good start.

I hope this helps someone.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
0
Note
The installation was broken into multiple msi's:

MS C++ Visual Redistributable 2005
The following are needed only for OFFLINE selection:
----
MSXML 6.0 SP2
Microsoft SQL Server Native Client 9.00.3042.00
Microsoft SQL Server Setup Support Files (English) 9.00.3042.00
Microsoft SQL Server VSS Writer 9.00.3042.00
Microsoft SQL Server 2005 9.0.3042.0
DotNet 3.0
Microsoft Report Viewer Redistributable 2005
----

client.msi (Dynamics CRM main installation file).

Properties to set:

NOSELECTION=1
ALLOWRUN=1
INSTALLLEVEL=2/3 (Microsoft Dynamics CRM for Outlook / Microsoft Dynamics CRM for Outlook with Offline Access)

When installing SQL Server is very important to add the following property to the sql msi instal: INSTANCENAME=CRM.

If you have a Custom Action DBAction that fails then you need to first remove dotNet2.0 and then install 3.0 version. If 3.0 gets installed on top of 2.0 then CRM will fail to install.
Hope this helps you as it toked 1.5 days to figure it all out.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
0
Note
Two Scripts required. Script 1 called setup.cmd installs the product and various rollup patches and copies the configuration script.

REM This section installs the pre-req software visual C++ 2005 and MS Error Reporting and C:\temp
if not exist C:\temp mkdir C:\temp
icacls C:\temp /grant Users:(OI)(CI)M
msiexec /i watson.msi /qn
Vcredist_x86.exe /q:a
REM This section installs the CRM client, it can take a while to fully complete.
SetupClient.exe /Q /L "c:\temp\CRMClient.log" /targetdir "c:\program files\Microsoft Dynamics CRM" INSTALLLEVEL=2
REM This section pauses the script so the CRM client can finish installing before installing rollups.
ping localhost > nul
ping localhost > nul
ping localhost > nul
ping localhost > nul
ping localhost > nul
ping localhost > nul
ping localhost > nul
ping localhost > nul
ping localhost > nul
ping localhost > nul
ping localhost > nul
ping localhost > nul
ping localhost > nul
ping localhost > nul
REM The rollups can now be installed.
CRM4_Rollup1.exe /q /norestart /log C:\temp\CRM_rollup1.log
CRM4_Rollup2.exe /q /norestart /log C:\temp\CRM_rollup2.log
CRM4_Rollup3.exe /q /norestart /log C:\temp\CRM_rollup3.log
CRM4_Rollup7.exe /q /norestart /log C:\temp\CRM_rollup7.log
CRM4_Rollup10.exe /q /norestart /log C:\temp\CRM_rollup10.log
CRM4_Rollup11.exe /q /norestart /log C:\temp\CRM_rollup11.log
CRM4_Rollup12.exe /q /norestart /log C:\temp\CRM_rollup12.log
REM This section copies the CRM Config executable file to the public desktop.
copy "CRM Config.exe" "C:\Users\Public\Desktop\CRM Config.exe"

Script 2 is shown below it is a simple configuration script which we have put into an executable called CRM Config.exe using bat_to_exe_converter. Batch script shown below.

"C:\Program Files\Microsoft Dynamics CRM\Client\ConfigWizard\Microsoft.Crm.Client.Config.exe" /q /config "\\server\public\CRM\Client_Config.xml" /l c:\temp\CRM_Config.log

This script in the exe must be ran as the logged in user, this is why we copy it to their desktop. We give them full write access to C:\temp for the logging and ask that they run it to configure the CRM system.

Please keep in mind that before launching the CRM config.exe the user must have previously opened outlook to create their mail profile.

Walla!
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows

Inventory Records (2)

View inventory records anonymously contributed by opt-in users of the K1000 Systems Management Appliance.

Dynamics CRM

Version

4.0.7333.3

Contact

Microsoft Corporation

Questions & Answers (2)

Questions & Answers related to Microsoft Dynamics CRM

1
ANSWERED
5
ANSWERED

Blogs (0)

Blog posts related to Microsoft Dynamics CRM

Reviews (0)

Reviews related to Microsoft Dynamics CRM

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ