Enables system administrators to configure Microsoft Dynamics AX by supplying the Microsoft Dynamics AX client with an .xml file that contains configuration commands. The SysAutoRun class can also be used for testing purposes and to run custom code when Microsoft Dynamics AX is started.
Note |
|---|
|
To use the SysAutoRun configuration .xml file, see the Remarks section later in this topic.
|
Called
Configure Microsoft Dynamics AX by using a SysAutoRun configuration XML file.
-
Create an .xml file, for example, C:\Configuration.xml.
-
Add a root tag that specifies the Microsoft Dynamics AX version.
You can also use the root tag to specify the path to a log file, how log information should be presented, and whether Microsoft Dynamics AX should be closed after the configuration file is run.
-
Add one or more tags that specify the task(s) that you want to run and the attributes needed for these tasks.
-
Run ax32.exe with the following parameter:
StartupCmd=AutoRun_c:\Configuration.XML
-
Wait while the system runs the requested tasks.
-
Check the log file for any errors.
-
Start using Microsoft Dynamics AX.
The root tag for the configuration file is called AxaptaAutoRun. For a description of the version, log file and other options, see the parmCwd, parmExitWhenDone, parmLogFile, and parmLogToScreen methods.
The tags mentioned in step 3 are shown in the following example, and described in the Help topics for the SysAutoRunexec* methods. For a list of these methods, see the previous Methods table. Each tag specifies a single task. Some tags have attributes that supply additional parameters, such as a name or the path to a file.
The following example shows the contents of a SysAutoRun configuration file.
<AxaptaAutoRun
exitWhenDone="false"
version="4.0"
logFile="D:\Axapta\AxaptaAutorun.log">
<CompileApplication crossReference="false" />
<LicenseInformation file="d:\axapta\license.txt" />
<Configuration>
<ConfigurationKey name="SysUserLog" enabled="true" />
<ConfigurationKey name="PBA_AdvancedProductBuilder"
enabled="false" />
</Configuration>
<AdjustGlobalTypes>
<AccountNum length="24" adjustRight="false" />
<AmountMst displayLength="12" decimals="10" />
</AdjustGlobalTypes>
<Synchronize />
<UpdateCrossReference />
<UserGroups>
<UserGroup id="sales" name="Sales force" />
</UserGroups>
<Users>
<User id="MaryN"
name="Mary North"
email="someone@example.com"
language="en-us"
companyId="ex"
osAccount="MaryN"/>
</Users>
<CompanyAccounts>
<Company id="NWT" name="Northwind Traders" overwrite="true" />
</CompanyAccounts>
<XpoImport
file="d:\axapta\setup\XPO\Logger\Enum_TestLogEntryType.xpo" />
<DataImport companyId="BVT" file="d:\axapta\basedata.dat" />
<Run type="class" name="RunMyTests" method="main" />
<PreventCheckList />
</AxaptaAutoRun>
SysStartupCmdAutoRun Class