win_file_version – Get DLL or EXE file build version — Ansible Documentation

- AnsibleFest
- Products
- Community
- Webinars & Training
- Blog

Documentation

# win_file_version – Get DLL or EXE file build version

- Synopsis
- Parameters
- Notes
- See Also
- Examples
- Return Values
- Status

## Synopsis

- Get DLL or EXE file build version.

## Parameters

Parameter | Choices/Defaults | Comments
--- | --- | ---
path path / required |  | File to get version. Always provide absolute path.

## Notes

Note

- This module will always return no change.

## See Also

See also

win_file – Creates, touches or removes files or directories
  The official documentation on the win_file module.

## 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, the following are the fields unique to this module:

Key | Returned | Description
--- | --- | ---
file_build_part string | no error | build number of the file.
file_major_part string | no error | the major part of the version number.
file_minor_part string | no error | the minor part of the version number of the file.
file_private_part string | no error | file private part number.
file_version string | no error | File version number..
path string | always | file path
product_version string | no error | The version of the product this file is distributed with.

## Status

- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]

### Authors

- Sam Liu (@SamLiu79)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.