Deploy Microsoft Chart Controls in Script/Package During Task Sequence

MikeB101 1 Reputation point
2022-02-11T21:20:22.223+00:00

I'm trying to deploy Microsoft Dynamics AX 2012 R3 using a script. One of the Prerequisites of AX 2012 is Microsoft Chart Controls.

Here is a "script" with some one-liners that I am using. All of these work and get installed, except Microsoft Chart Controls:

Install Windows Identity Foundation

Enable-WindowsOptionalFeature -Online -FeatureName Windows-Identity-Foundation -NoRestart

Copy AX Parameters file to local drive

xcopy .\axparm.txt c:\tempax\

xcopy .\1-MSChart.exe c:\tempax\

xcopy .\2-SQLSysClrTypes.MSI c:\tempax\

xcopy .\3-ReportViewer.MSI c:\tempax\

xcopy .\4-SQLSERVER2008_ASAMO10.MSI c:\tempax\

xcopy .\setup.exe c:\tempax\

Install PreReqs after copying them locally

start-process -FilePath "C:\tempax\1-MSChart.exe" -ArgumentList "/q /norestart" -wait

start-process -FilePath "C:\tempax\2-SQLSysClrTypes.MSI" -ArgumentList "/q" -wait

start-process -FilePath "C:\tempax\3-ReportViewer.MSI" -ArgumentList "/q" -wait

start-process -FilePath "C:\tempax\4-SQLSERVER2008_ASAMO10.MSI" -ArgumentList "/q" -wait

Install Microsoft Dynamics AX R3 with Parameter File

start-process -FilePath "C:\tempax\setup.exe" "ParmFile=C:\TEMPAX\AXParm.txt" -wait
Remove-Item -Path "C:\TEMPAX" -Recurse

Again, all of these work and get installed except for MS Chart Controls. The command I'm using inside of the package to deploy this is:

powershell.exe -executionpolicy bypass -command ".\AXConfig2.ps1"

Here is a list of things I've tried:

1.) instead of using start-process, using CD C:\tempax\1-MSChart.exe /q inside the script. It doesn't work.

2.) Using the built in "Install this program first" in the properties of the package to install a separate package with Microsoft Chart Controls. A separate package works with it's own task sequence step fine, but I need this to be a part of the script. I need to have 1 package that installs of the PreReqs otherwise I have to include it in the base image, and not all computers in our company need it.

3.) Converting the package to an application and then using a separate MS Chart Controls application and listing it as a dependency. For some reason, listing applications as dependencies don't work in my environment at all as far as I can tell. The installer always fails.

I have a feeling I'm just doing something completely wrong, but I really need to deploy all PreReqs for this program in one package, or one Application. I'm using the UDI Wizard now at my company because we're actually split into 3 different companies now, and we have to maintain an absurd amount of software for each of the 3 companies that we split into.

Can someone please help?

Microsoft Security Intune Configuration Manager Deployment
Microsoft Security Intune Configuration Manager Application
Microsoft Security Intune Configuration Manager Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amandayou-MSFT 11,156 Reputation points
    2022-02-14T03:18:22.39+00:00

    Hi,

    Could we know if the script is same as the following script:

    #Install Windows Identity Foundation  
    Enable-WindowsOptionalFeature -Online -FeatureName Windows-Identity-Foundation -NoRestart  
      
    #Copy AX Parameters file to local drive  
      
    xcopy .\axparm.txt c:\tempax\  
      
    xcopy .\1-MSChart.exe c:\tempax\  
      
    xcopy .\2-SQLSysClrTypes.MSI c:\tempax\  
      
    xcopy .\3-ReportViewer.MSI c:\tempax\  
      
    xcopy .\4-SQLSERVER2008_ASAMO10.MSI c:\tempax\  
      
    xcopy .\setup.exe c:\tempax\  
      
    #Install PreReqs after copying them locally  
      
    $p1 = start-process -FilePath "C:\tempax\1-MSChart.exe" -ArgumentList "/q /norestart" -NoNewWindow -Wait -PassThru  
      
    $p2 = start-process -FilePath "C:\tempax\2-SQLSysClrTypes.MSI" -ArgumentList "/q" -NoNewWindow -Wait -PassThru  
      
    $p3 = start-process -FilePath "C:\tempax\3-ReportViewer.MSI" -ArgumentList "/q" -NoNewWindow -Wait -PassThru  
      
    $p4 = start-process -FilePath "C:\tempax\4-SQLSERVER2008_ASAMO10.MSI" -ArgumentList "/q" -NoNewWindow -Wait -PassThru  
      
    #Install Microsoft Dynamics AX R3 with Parameter File  
     if ($p1.exitcode -eq 0 -and $p2.exitcode -eq 0 -and $p3.exitcode -eq 0 -and $p4.exitcode -eq 0)  
    {  
     start-process -FilePath "C:\tempax\setup.exe" "ParmFile=C:\TEMPAX\AXParm.txt" -wait  
     Remove-Item -Path "c:\tempax" -Recurse  
    }  
    

    If not, please verify it.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.