Posts Tagged ‘Silent’

Silent or Unattended Installation of NAV 2009

Thursday, April 28th, 2011

Hi everyone,

I’ve recently followed a nice 1hour-livemeeting about silent installation of microsoft dynamics nav 2009 R2 (or, as MS relator says: “microsoft dynamics EN-EI-VI two thousands and nine, AR two”).

First of all: about half of the meeting have been wasted in saying the product name :)

But let’s get into the good part.

WHAT IS SILENT OR UNATTENEDED INSTALLATION

Maybe a lot of you already know it, but for completeness, i’ll explain it here in two words: basically a silent installation is exactly what you can imagine. A software (in our case nav2009) is installed on a client pc without user interface and user interaction (that is: no “next->next->…->finish” procedure).

This is quite useful if you want to spare time during client installations, especially if there are a lot of client PCs being involved.

INTRODUCTION

Microsoft recommends to only run “setup.exe” file when you install a new NAV client (and/or server), because the installer have been tested by them using this procedure only. This means that you shouldn’t run the various .msi files individually (althought possible ;) ).

Anyway, the setup.exe file runs all the .msi files that are necessary for a correct installation. It also installs the prerequisites, for example .NET framework3.5, and other stuff.

This means that our goal is to run this exe silently.

RUN THE EXE SILENTLY

Nothing simpler! there are some parameters that you can append to the command line in order to achieve fancy things:

/quiet <– you can guess that we need this to run the exe in background

/log  [filename] <– create a log textfile in the specified position

/config [filename]<– another key feature we need to configure our installation automatically

/uninstall <– i’m still wondering what this will do ;)

/repair <– repairs a bad installation

LET’S INSTALL!

First of all, let’s start our exe file by doubleclicking it, as always.

Then let’s go through all the steps of the installation, select the pieces of software we want to install (classic, roletailored, server, etc) and then STOP(!) at the very last screen of our installation wizard: DON’T PUSH FINISH!! Click instead on one of the links of the configurable parts, for example “Role tailored client” and go ahead with some further configuration.

(in the screenshot, you can find my configuration. The blacked values are all my computer name. Because i’m going to install my standalone dev environment).

 My install screen

You can guess what we’re going to do now: click on “Save Configuration Settings” and create an xml file. You can open this xml file and check what it contains: a list of all the product components and how to behave with them (there are actions like local, absent, repair, bla bla bla…). Why do we need this file? In order to avoid user intervention during installation, obviously! The xml will be the [filename] argument of our “/config” parameter.

Now, you can run the silent install by simply doing start -> run -> [exepath] /quiet /config [configfilepath.xml], but there’s a much more smart way to do it: create a bat file that tells you that the installer is working, and alerts you when it has finished with a message. In this way, you can deploy the file on various PCs, and start it. In order to achieve this simple task, just copy the following text in a notpad and save it as .bat instead of .txt. 

[exepath] -> where setup.exe is placed: simply write setup.exe if the but is in the same folder of the setup.exe ;)

[configpath] -> where you have saved the configuration xml file .

[logpath] -> where do you want (if you want it) the log file path saved. I always recommend to create this log.

Remember to write file extensions, too, and also place the paths between the double quotemarks if the one of they contain spaces or special characters! ;)

@echo off
Echo start INSTALLING NAV2009R2: IT WILL TAKE SOME TIME, PLEASE WAIT...
Time /t
[exepath(.exe)] /quiet /config [configpath(.xml)] /log [logpath(.txt)]
Echo end: INSTALLATION COMPLETE! YOU CAN NOW UNLEASH THE PWR OF NAV2009R2!!!
Time /t
pause

The installer will take much more time if it’s the first installation, because the prerequisites are huge. The nav installation alone will take only a few minutes, instead.

And that’s it! you can create as many configuration files as you want. Be sure to take a look to the log file, too and keep in mind that the root folder of the installer shouldn’t be too “deep” in your file system. I received some errors during my tests which disappeared after moving the root folder of the installer under “C:\” …weird, huh? (unless i’ve messed up something with the installer) O.o

Happy Install!