Skip to main content
Dynamics 365

How to generate the ‘hotfix directories’ from Microsoft Dynamics NAV

Some of you have missed the so-called “hotfix directories” that have not be part of the monthly updates since Cumulative Update 1 for Microsoft Dynamics NAV 2015 removed. So in November 2014, we wrote here on the blog how to use a Windows PowerShell script that gives you the same folder structure.

It’s a best practice for Dynamics NAV, however, to completely reinstall the environment from scratch in order to keep clean and consistent registry key with platform files used.

So this new blog post gives you a flexible script so that you can use the same script for Microsoft Dynamics NAV 2015, 2016, 2017 and 2018.

To use the script

  1. Copy the code below to a local file and save the file as Copy-UpdateFilesToBatchDirectory.ps1.
  2. Unzip the DVD zip file from the Cumulative Update to a local folder.
  3. Run the script.
    1. Open the Microsoft Dynamics NAV Administration Shell as Administrator
    2. Run this command:

     Import-Module DIRECTORY\Copy-UpdateFilesToBatchDirectory.ps1

    where DIRECTORY is the location where you saved the .ps1 file.
    3. Run this command:

     Copy-UpdateFilesToBatchDirectory -DvdDirectory DVDDIRECTORY -Verbose

    where DVDDIRECTORY is the location where you unzipped the DVD from the update,

  4. It should take less than a minute to go through the process, but when done, you should get the same structure as you had before with Microsoft Dynamics NAV 2013 and 2013 R2, located in the same DVD root in a new folder called HOTFIX.

Changes to the script

Changed BatchFolder parameter from Mandatory to Optional.
If not specified, Hotfix (batch) folder will be created automagically inside the DVD folder as a directory called HOTFIX.
Automatic check for Microsoft Dynamics NAV Version
Automatic detection and inclusion for Localized platform files
Detected by the script checking if Installers exists. If it does, it will create a collection of localized version(s) – e.g. with CH you have,, – and runtime copy encoding files (stx, etx) in the appropriate directories
Updated script for Microsoft Dynamics NAV 2017
Updated script for Microsoft Dynamics NAV 2018
The Web Server deployment changed with this major version. These are the two breaking changes:

  1. WEB CLIENT. The files contained in this directory should be copied into Microsoft Dynamics NAV Web Client folder (typically C:\Program Files\Microsoft Dynamics NAV\110\Web Client). Moreover the files contained in the WEB CLIENT\WebPublish should be copied in the Web Server directory(ies) (e.g. C:\inetpub\wwwroot\DynamicsNAV110 where DynamicsNAV110 is the server name).
  2. ModernDev. VSIX file, System and Test APP needs to be updated in the Modern Development environment, if you intend to develop extensions.

WithSound optional switch
Introduced optional parameter for accessibility.

Updated script

Copy-UpdateFilesToBatchDirectory – change the file extension to .ps1


These postings are provided “AS IS” with no warranties and confer no rights. You assume all risk for your use.

Jorge Alberto Torres (jtorres)
MDCC Lyngby
Service Engineering Team

Duilio Tacconi (dtacconi)
Denmark Microsoft Dynamics – Italy
Microsoft Customer Service and Support (CSS) EMEA