aws / aws/amazon-cloudwatch-agent
Add file version info in exe files
- Dominant language
- Go
- Stars
- 550
- Forks
- 271
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 13
Description
**Is your feature request related to a problem? Please describe.**
We'd use Ansible win_package module (https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_package_module.html) to manage CloudWatch Agent on Windows servers. Sepcifically to be able to check the installed version and update it if it's not up to date.
There's a parameter "creates_version" which will check the file version property of the file at creates_path (of the CloudWatch Agent executable file) and use the result to determine whether the package is already installed.
It depends on the "file version property" of the executable files of CloudWatch Agent. Unfortunately such info does not exist in CloudWatch Agent.
If we right click any exe file such as "C:\Program Files\Amazon\AmazonCloudWatchAgent\start-amazon-cloudwatch-agent.exe" and choose "Properties" > " Details", the "File version" or "Product version" is blank.

Or we can check via PowerShell, e.g:
>PS C:\Windows\system32> $path="C:\Program Files\Amazon\AmazonCloudWatchAgent\start-amazon-cloudwatch-agent.exe"
>PS C:\Windows\system32> [System.Diagnostics.FileVersionInfo]::GetVersionInfo($path) | Select-Object *
>
> FileVersionRaw : 0.0.0.0
> ProductVersionRaw : 0.0.0.0
> Comments :
> CompanyName :
> FileBuildPart : 0
> FileDescription :
> FileMajorPart : 0
> FileMinorPart : 0
> FileName : C:\Program Files\Amazon\AmazonCloudWatchAgent\start-amazon-cloudwatch-agent.exe
> FilePrivatePart : 0
> FileVersion :
> InternalName :
> IsDebug : False
> IsPatched : False
> IsPrivateBuild : False
> IsPreRelease : False
> IsSpecialBuild : False
> Language :
> LegalCopyright :
> LegalTrademarks :
> OriginalFilename :
> PrivateBuild :
> ProductBuildPart : 0
> ProductMajorPart : 0
> ProductMinorPart : 0
> ProductName :
> ProductPrivatePart : 0
> ProductVersion :
> SpecialBuild :
Can such file version info be added into exe files of CloudWatch Agent for Windows?
**Describe the solution you'd like**
Add file version info into exe file property.
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
Contributor guide
Research direction
No source file or test is named. Start by tracing the Windows executable build and packaging configuration, then inspect the generated files with PowerShell FileVersionInfo. Done means the CloudWatch Agent executables expose usable file and product version values matching the agent release.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100