Important Notice: On February 29th, this community will be put into read-only mode. All existing posts will remain but customers will be unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Installer returned error code 2 when deploying Dynamics NAV 2009

I'm trying to install Dynamics NAV 2009 with config file component selection. 

To execute Setup.exe file, I will need other other files and directories, so I checked option include all files/folders in directory.
In parameters I wrote "/config <NAV_xml_config_file.xml>".
Even when I tried to install all components, without send parameters, got error "error code 2"
Could you help me?

(Originally from ticket 11053)

0

Comments

15 comments
Date Votes
  • You made a good call on checking the Include entire directory option. Is the config xml file in the root directory (same directory as setup.exe?

    Try running the installation on one of the machines without using PDQ Deploy. Make sure you run it with the exact same parameters (command line).

    For example, copy the installation files down to C:\Temp\NAV. Then from your cmd.exe or your run window type in your command line.

    setup.exe /config <nav_file> /quiet 

    Did the installation succeed? If it didn't then you need to verify that A) the command line parameters are correct and B) the config file used is valid and contains the necessary properties.

    If the local installation did succeed then you may want to try changing the deployment to "Run as local system". You will see this option on the Deploy Now window.

    0
  • "Is the config xml file in the root directory (same directory as setup.exe?" Yes.

    Like you suggest, I copied all installation files/folder to a directory in my destination machine and in cmd.exe run "setup.exe /config InstallClientNAV.xml /quiet" and the installation succed.

    I already did the deployment like "Run as local system", I tried again after, just to make sure, and still got "error code 2".

    0
  • Hi Claudia,

    Go out to one of the target computers. Copy the entire installation down to the local computer. (perhaps put it in c:\temp directory).

    Open your cmd.exe window. If this OS has UAC enabled then you may need to run it in elevated mode. (Go to your "Command Prompt" shortcut in Start/Accessories and right click and then choose "Run as Administrator")

    Go to your directory containing the setup files for NAV

    cd \temp\DynamicsNAV
    setup.exe /config "LGP_POS_soClient.xml" /quiet 

    Does the installation succeed? When the setup.exe returns run the following command

    echo %errorlevel%

    What is the error code? Is it 2?

    0
  • I did everything like you told me on one of the target computer.

    In command prompt, went to my directory containing the setup files for NAV.

    Run comand above and the installation succeed.

    setup.exe /config "LGPPOSsoClient.xml" /quiet 

    And in the result of command above I got 0.

    echo %errorlevel%

    In attach a print of command prompt.

    0
  • Hi Claudia!

    I got the same problem too. Did you manage to solve the issue? If so, please share?? :-)

    /Roy

    0
  • Thanks, Claudia. When you ran the install from the command prompt did the software get successfully installed? Error code 0 almost always means success but I just need to be sure that it did install outside of PDQ Deploy.

    0
  • Yes, when I ran the command  locally in my target machine I successfully installed NAV 2009 and got error code 0.

    0
  • Hi Claudia

    Did you solve the problem? We have the same problem in my company. There is no problem installing outside deployment solution. Sitting at the computer doing the installation always results in errorlevel 0. Please share if you solved the issue. Tanks! :-)

    0
  • SOLVED!

    I finally managed to solve the issue. The problem was the '/quiet' parameter at the end. It should be used right after the setup.exe This solved the problem for me:

    setup.exe /quiet /config "LGPPOSsoClient.xml"

    0
  • Hi Roy,

    I've tried your solution but unfortunately, didn't work for me.

    I send in attach my installer setup. Could you see if I have any different, please.

    0
  • A batch file is usually the best results for me when using deploy. 

    Looking at your screenshot, i believe you need to include the "setup.exe" line as well. 

    So in the parameter's field should look like: setup.exe /quiet /config "LGPPOS...xml"

    Or, try using a batch file and include the above line in there. All you'll need to do is point the program to the batch, and do not add any parameters except for the default that PDQ adds for you, and you should be set. 

    0
  • btw, disregard my first suggestion. as it autopopulated it for you... but you could still try the second suggestion of creation of a batch file. 

    0
  • Hi Claudia,

    This is the exact string in my batch file:

    C:\Temp\NAV60R2\setup.exe /quiet /config C:\Temp\NavInst\HKTesttilgang.xml

    The batch file is executed by local system account on the computer to be installed on. I'm using Altiris Deployment Solution btw. The source files has been copied to the computer (C:\Temp\NAV60R2) before setup.exe is executed by the batch file.

    0
  • Having the same problem as you - I described it here:

    http://support.adminarsenal.com/entries/51972144-Run-a-remote-cmd-from-PDQ-deploy

    I am able to do a workaround.

    If the destination PC has a logged on user with administrative rights, I can deploy the package by selecting Run as Logged on user

    But. I would like to be able to install the package regardless if any admin is logged on locally to the dest. PC.

    Then I managed to deploy the package with "Run as local system" IF and only IF the following directories are present:

    "C:\Windows\System32\config\systemprofile\AppData\Roaming"
    "C:\Windows\System32\config\systemprofile\Desktop"
    "C:\Windows\System32\config\systemprofile\Favorites"
    "C:\Windows\System32\config\systemprofile\Documents"
    "C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Templates"
    "C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft\Windows\SendTo"
    “C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu”
    “C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup”

    HTH

    Regards, Lars.

    0
  • And if OS is 32 bit.

    If 64 bit, the paths are supposed to be something like this

    C:\Windows\SysWOW64\config\....

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post