Deployment Tools Foundation
GetFileVersion Method (path)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► Installer ► GetFileVersion(String)
Gets the version string of the path specified using the format that the installer
expects to find it in in the database.
Declaration Syntax| C# | Visual Basic | Visual C++ |
public static string GetFileVersion( string path )
Public Shared Function GetFileVersion ( path As String ) As String
public: static String^ GetFileVersion( String^ path )
Parameters- path (String)
- Path to the file
Return ValueString
Version string in the "#.#.#.#" format, or an empty string if the file does not contain version information
Version string in the "#.#.#.#" format, or an empty string if the file does not contain version information
RemarksWin32 MSI API: MsiGetFileVersion
Exceptions| Exception | Condition |
|---|---|
| FileNotFoundException | the file does not exist or could not be read |
Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.9.1006.0)