Compartilhar via


GetBuildVersion

Gets the Microsoft Dynamics NAV product name and build version number that is currently installed and saves the information to a .txt type file.

finsql.exe command=getbuildversion, file=<versionfile>[, logfile=<path and filename>]

Parameters

file

Specifies the folder path and file name of the text file, for example C:\navbuildversion.txt, in which to save the build information. This parameter is required.

logfile

The folder path and file name of a text file, for example C:\navbuildversionlog.txt, in which to save error messages that result from the command. If there are no errors when you run the command, then a log file is not created.

Remarks

When you run the command, a file that contains information about the success or failure of the command is automatically created. The file has the name navcommandresult.txt. If you specify the logfile parameter, then the navcommandresult.txt file is created in the folder that is specified by the logfile parameter. If you do not specify the logfile parameter, the file is created in the same location as finsql.exe file, which by default is C:\Program Files (x86)\Microsoft Dynamics NAV\90\RoleTailored Client.

Note

If User Access Control (UAC) is turned on and you do not run the command prompt as an Administrator, then the command prompt window runs as a standard user. In this case, if you do not specify the logfile parameter, then the command fails because the standard user cannot write to the default location of the finsql.exe file.

Example

This example shows how to run the GetBuildVersions command to get the product name and version of Microsoft Dynamics NAV that is currently installed on the computer. The example saves the build version information to a .txt type file that has the path and file name C:\temp\navbuildversion.txt. The example also specifies a log file that has the path and file name C:\temp\navbuildversionlog.txt

finsql.exe command=getbuildversion.txt, file=C:\temp\navbuildversion.txt, logfile= C:\temp\navbuildversionlog.txt

The build version file, in this case navbuildversion.txt, includes information that is similar to the following:

Product Name: Microsoft Dynamics NAV 2016

Product Version: 8.0.38865.0

See Also

Concepts

Using the Development Environment from the Command Prompt
Development Environment Commands