Documentation

win_file_version - Get DLL or EXE file build version

New in version 2.1.

Synopsis

  • Get DLL or EXE file build version
  • change state alway be false

Options

parameter required default choices comments
path
yes
File to get version(provide absolute path)

Examples

- name: Get acm instance version
  win_file_version:
    path: C:\Windows\System32\cmd.exe
  register: exe_file_version

- debug:
    msg: '{{ exe_file_version }}'

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
win_file_version.file_major_part the major part of the version number. no error string
win_file_version.file_minor_part the minor part of the version number of the file. no error string
win_file_version.file_version file version number. no error string
win_file_version.product_version the version of the product this file is distributed with. no error string
win_file_version.file_private_part file private part number. no error string
win_file_version.path file path always string
win_file_version.file_build_part build number of the file. no error string


Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Support

This module is community maintained without core committer oversight.

For more information on what this means please read Module Support

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.