AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 15.08.2013, 01:16   #1  
Blog bot is offline
Blog bot
Участник
 
25,626 / 848 (80) +++++++
Регистрация: 28.10.2006
crminthefield: Use PowerShell: build a redist folder to install Dynamics CRM 2011 without an internet connection
Источник: http://blogs.msdn.com/b/crminthefiel...onnection.aspx
==============

Most likely you’ve read Shawn Dieken’s wildly popular article on how to create a redist folder when installing CRM without an internet connection. Today I was presented with a customer scenario where a server that should have had internet access did not and thus, we had to install without internet access. No big deal, however after walking through the article I quickly realized this task, while effective, was pretty monotonous and not a lot of fun. I caught myself thinking “there must be a better way” – and turns out there was and all we needed to do was bring PowerShell into the mix!

With a few lines of code and a little testing, I had a script to paste in to PowerShell and create my very own CRM 2011 Redist folder with all the pre-requisite files.

Usually you find PowerShell scripts downloadable as PS1 files, but sometimes in scenarios like this I find myself just wanting to, copy my script, open PowerShell, Paste, and Go. With that in mind, this script can be simply copied and pasted into PowerShell so you can quickly build your redist folder.

Instructions for use:
  1. Open PowerShell on the computer you have internet access on
  2. Copy the script below top to bottom (from the “#begin script” to the “#end script”)
  3. Paste it right into PowerShell – if it doesn’t execute hit enter to run the “Create-CRM2011Redist” function
  4. This will pop up a folder picker, pick a folder and press OK
  5. After you press Ok, the script will create a new Redist folder in the destination you’ve selected it will then proceed to create the directory structure (11 Folders), then download 24 files, this should total about 216MB of disk space when it’s all done.
  6. Finally, once it has completed, copy the redist folder to the install folder containing: Server, Client, EmailRouter, and BIDSExtensions folders
  7. When you’re done copying your install folder should look like the graphic below:
#begin Script
#Function to Show an Open Folder Dialog and return the directory selected by the user.
function Read-FolderBrowserDialog([string]$Message, [string]$InitialDirectory)
{
$app = New-Object -ComObject Shell.Application
$folder = $app.BrowseForFolder(0, $Message, 0, $InitialDirectory)
if ($folder) { return $folder.Self.Path } else { return '' }
}
#download pre-req function, also creates the folders
function dlPreReq($root, $folderName, $fileName, $url)
{
$fldr = Join-Path -Path $root -Child $folderName
$dest = Join-Path -Path $fldr -Child $fileName

#create folder if it doesnt exist
if((Test-Path -Path $fldr) -ne $True)
{
New-Item -Path $fldr -ItemType directory | out-null
}
Write-Host ("Downloading {0} to path: {1} " -f $fileName, $fldr)
$wc = New-Object system.net.webclient
$wc.downloadFile($url,$dest)
}
#download each pre-req
function Create-CRM2011Redist()
{
$folderRoot = (Read-FolderBrowserDialog "Pick the location to create the Dynamics CRM 2011 redist folder")
if(($folderRoot.length) -gt 0)
{
$folderRoot = Join-Path -Path $folderRoot -Child "Redist"
dlPreReq $folderRoot dotNETFX "dotNetFx40_Full_x86_x64.exe" "http://go.microsoft.com/fwlink/?LinkId=182091&clcid=0x409"
dlPreReq $folderRoot DotNetServicesSDK WindowsAzureAppFabricSDK-x64.msi "http://go.microsoft.com/fwlink/?LinkId=178254&clcid=0x409"
dlPreReq $folderRoot IDCRL wllogin_32.msi "http://go.microsoft.com/fwlink/?LinkId=194721&clcid=0x409"
dlPreReq $folderRoot IDCRL wllogin_64.msi "http://go.microsoft.com/fwlink/?LinkId=194722&clcid=0x409"
dlPreReq $folderRoot MSI45 WindowsServer2003-KB942288-v4-x86.exe "http://go.microsoft.com/fwlink/?LinkID=139114&clcid=0x409"
dlPreReq $folderRoot MSI45 WindowsServer2003-KB942288-v4-x64.exe "http://go.microsoft.com/fwlink/?LinkID=139115&clcid=0x409"
dlPreReq $folderRoot MSI45 Windows6.0-KB942288-v2-x86.msu "http://go.microsoft.com/fwlink/?LinkID=139108&clcid=0x409"
dlPreReq $folderRoot MSI45 Windows6.0-KB942288-v2-x64.msu "http://go.microsoft.com/fwlink/?LinkID=139110&clcid=0x409"
dlPreReq $folderRoot MSI45 WindowsXP-KB942288-v3-x86.exe "http://go.microsoft.com/fwlink/?LinkID=139113&clcid=0x409"
dlPreReq $folderRoot MsoIdCrl msoidcli_32.msi "http://go.microsoft.com/fwlink/?LinkId=221498&clcid=0x409"
dlPreReq $folderRoot MsoIdCrl msoidcli_64.msi "http://go.microsoft.com/fwlink/?LinkId=221500&clcid=0x409"
dlPreReq $folderRoot ReportViewer ReportViewer.exe "http://go.microsoft.com/fwlink/?LinkId=193386&clcid=0x409"
dlPreReq $folderRoot SQLCE SSCERuntime-ENU-x86.msi "http://go.microsoft.com/fwlink/?LinkId=147327&clcid=0x409"
dlPreReq $folderRoot SQLCE SSCERuntime-ENU-x64.msi "http://go.microsoft.com/fwlink/?LinkId=147326&clcid=0x409"
dlPreReq $folderRoot SQLExpr SQLEXPR_x86_ENU.exe "http://go.microsoft.com/fwlink/?LinkId=179623&clcid=0x409"
dlPreReq $folderRoot SQLNativeClient sqlncli_x64.msi "http://go.microsoft.com/fwlink/?LinkId=178252&clcid=0x409"
dlPreReq $folderRoot VCRedist vcredist_x86.exe "http://go.microsoft.com/fwlink/?LinkId=195255&clcid=0x409"
dlPreReq $folderRoot VCRedist vcredist_x64.exe "http://go.microsoft.com/fwlink/?LinkId=195257&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows5.2-KB974405-x86.exe "http://go.microsoft.com/fwlink/?LinkId=200432&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows5.2-KB974405-x64.exe "http://go.microsoft.com/fwlink/?LinkId=200430&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.0-KB974405-x86.msu "http://go.microsoft.com/fwlink/?LinkId=190775&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.0-KB974405-x64.msu "http://go.microsoft.com/fwlink/?LinkId=190771&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.1-KB974405-x86.msu "http://go.microsoft.com/fwlink/?LinkId=190781&clcid=0x409"
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.1-KB974405-x64.msu "http://go.microsoft.com/fwlink/?LinkId=190780&clcid=0x409"
}
else
{
write-host "No folder selected, operation was aborted. Run Create-CRM2011Redist to retry."
}
}

#kick off the script
Create-CRM2011Redist

#end script




Источник: http://blogs.msdn.com/b/crminthefiel...onnection.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 12 Blog bot Dynamics CRM: Blogs 0 30.01.2013 01:11
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 4 Blog bot Dynamics CRM: Blogs 0 24.09.2011 01:16
crminthefield: Overview: Microsoft Dynamics CRM 4.0 Update Rollup 18 Blog bot Dynamics CRM: Blogs 0 01.07.2011 02:12
Microsoft Dynamics CRM Team Blog: Migrating Customizations to Microsoft Dynamics CRM 2011 Online Blog bot Dynamics CRM: Blogs 0 18.04.2011 23:11
jodonnell: Microsoft Dynamics CRM 2011 Product Team feels the need for speed Blog bot Dynamics CRM: Blogs 0 18.02.2011 10:11

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 06:40.