Before opening an installer, make sure it came from the expected download page. If the publisher provides a SHA-256 checksum, you can compare it with the file on your computer.
#Download the file
Use the Python download page as an example. Choose the file you intend to install and save it to your Downloads folder.
#Calculate its SHA-256 checksum
Open PowerShell and run this command, replacing the example path with the name of your downloaded file:
Get-FileHash "$env:USERPROFILE\Downloads\python-installer.exe" -Algorithm SHA256
PowerShell prints a long hexadecimal value in the Hash column.
#Compare the result
Compare the value with the SHA-256 checksum published by the software author for that exact file and version. The values must match exactly. If the author does not publish a checksum, there is no checksum to compare; use the official download source and check that the filename and version are what you expected.
If the checksum differs, delete the file and download it again from the official source. Do not run a file whose checksum does not match.