Dynamics AX 2009 Client config file start path problem

杀马特。学长 韩版系。学妹 提交于 2020-01-05 09:21:11

问题


I need to start the MS Dynamics AX 2009 client with different configurations to connect to different AOS.
To achieve this, I exported the client configuration into an axc-file, which works pretty well.
Now I want to share this file for all clients in our network, but it does not work on some because for some funny reason, the path to the Dynamics AX binaries are hardcoded into the client config file. So, on one computer the AX client is installed in C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\Bin, on the next in C:\Program Files\Microsoft Dynamics AX\50\Client\Bin, the file does not work, since the path in the axc is different from the real path.

How do I create an axc-file which is working on every client computer, so I can use a shared config file?


回答1:


The only workaround I found is to install the client on every computer in some custom path, like c:\ax instead of installing it into program files.

Ugly. I really hope Microsoft will fix this in some future version.




回答2:


You can use a junction point in NTFS to point "Program Files (x86)" to "Program Files" on 32 bit clients. A junction point is basically the Windows equivalent of a UNIX symbolic link.




回答3:


If you manage to deploy registry keys to the clients, then the solution is something like this:

  1. Export the AX configurations in question from the registry (Usually they can be found in HKCU\Software\Microsoft\Dynamics\5.0\Configuration), import it on the target computer (during domain logon, etc...)
  2. Create an lnk to the Ax32 application, and supply the command line parameter: -regconfig=<typeTheConfigNameHere>
    eg: Ax32.exe -regconfig=LIVE


Now that I type this, I realized an additional problem with this solution, which is again those paths... However it's easy to create and maintain two versions of the lnk files (one for 32 and another one for 64 bit environments)... And the registry is the same. Hope it helps!




回答4:


I'm using following structure of my development environment setup and I guess this is what you're looking for.

Below is example.


Server name: SRV01 On that server create folder for ex. AX5 and share that folder. Folder structure:

AX5
--Application
----Appl
------Application_1 <- here is your *.aod file(-s)
------Application_2 <- here is your *.aod file(-s)

--AXC
------Application_1
-------- usr.axc configuration file <- save your configuration here
-------- cus.axc configuration file <- save your configuration here
------Application_2 
-------- *.axc configuration file <- save your configuration here

--Client <- here is your Ax32.exe.
--Server <- here is your Ax32Serv.exe
--StartUp
------Application_1
-------- usr.bat with one line. In this case this would be \\SRV01\AX5\Client\Bin\Ax32.exe \\SRV01\AX5\AXC\Application_1\usr.axc
-------- cus.bat with one line. In this case this would be \\SRV01\AX5\Client\Bin\Ax32.exe \\SRV01\AX5\AXC\Application_1\cus.axc
------Application_2
-------- *.bat with one line. In this case this would be \\SRV01\AX5\Client\Bin\Ax32.exe \\SRV01\AX5\AXC\Application_1\*.axc

And here is example of *.axc file

Configuration export file for Dynamics
Formatversion: 1
Configuration: usr.axc
    logdir,Text,C:\Users\Public\Microsoft\Dynamics Ax\Log\ <------------- change this but it's up to you
    company,Text,
    startupcmd,Text,
    extracmdline,Text,
    startupmsg,Text,
    aos2,Text,AOS_Instance_Name@SRV01:2712 <------------- change this
    aosencryption,Text,1
    xppdebug,Text,1
    globalbreakpoints,Int,1
    aol,Text,usr
    aolcode,Text,
    traceeventsenabled,Text,1
    tracestart,Int,0
    tracexppmethodcalldepth,Text,3
    client,Text,thin
    _clientmode,Int,0
    sql,Int,1
    native,Int,0
    hassqlpwd,Int,0
    localappldoc,Int,0
    localsysdoc,Int,0
    applshare,Int,1
    applexclusive,Int,0
    hascompwd,Int,0
    hasserveridletimeout,Int,0
    allowunauth,Int,0
    windowsauth,Text,1
    sqloraclefirstrowsfix,Text,0
    hasocipwd,Int,0
    dbunicodeenabled,Text,1
    cachesynctime,Text,
    caslevel,Text,enable
    language,Text,
    _clientadname,Text,
    aos,Text,
    application,Text,
    bindir,Text,\\SRV01\AX5\Client\Bin <------------- change this
    broadcast,Text,
    compwd,Text,
    connectionidletimeout,Text,
    createdsn,Text,
    database,Text,AXDB   <------------- change this
    datadir,Text,\\SRV01\AX5\Client\Data  <------------- change this
    dbcli,Text,odbc
    dbserver,Text,SRV01  <------------- change this
    directory,Text,\\SRV01\AX5\Client  <------------- change this
    dsn,Text,
    exposeserverprinters,Int,0
    fetchahead,Text,
    haswarnings,Int,0
    hint,Text,
    ignoredatasourceindex,Text,0
    installationlanguage,Text,EN-US
    internet,Text,SRV01
    log,Text,
    newconnectionretrycount,Text,
    newconnectionretrydelayms,Text,
    ociconnectservice,Text,1
    ocidbid,Text,
    ocihost,Text,
    ociservice,Text,
    ocitcpipport,Text,1521
    opencursors,Text,
    port,Text,
    preloadthresholdmsec,Text,
    preloadthresholdrecords,Text,
    querytimelimit,Text,
    retry,Text,
    serveridletimeout,Text,
    servermask,Text,2712  <------------- change this
    sqlbuffer,Text,
    sqlcomplexliterals,Text,1
    sqlformliterals,Text,1
    sqlpwd,Text,
    sqltrace,Text,0
    sqluser,Text,
    user,Text,
    warnings,Text,
    tracemaxfilesize,Text,10000
    tracebuffersize,Text,1024
    tracemaxbuffers,Text,120
    traceminbuffers,Text,30
    traceallowclient,Int,0

Important note: install AX 2009 client on each client PC. While installation you'll be asked to state an AOS - state any value. This locally installed AX 2009 client needed as it use several additional assemblies which aren't in GAC.

Finally - how to start AX? Simply run a *.bat file. Hope I was clear enough and do hope I understood what you were looking for ))




回答5:


Just put both paths:

directory,Text,C:\Program Files\Microsoft Dynamics AX\50\Client
directory,Text,C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\Bin



回答6:


how about

C:\Progra~1\Microsoft Dynamics AX\50\Client



来源:https://stackoverflow.com/questions/906078/dynamics-ax-2009-client-config-file-start-path-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!