Forum Discussion
Dmitry_Nikolaev
14 years agoStaff
Hello Du,
I have tested your code and it works correctly for the Notepad.exe file in Windows XP. The problem does not look to be related to TestComplete. As the MSDN Library states,
So, please check:
- whether the path is valid and refers to an existing file.
- whether the file contains valid version info.
If this does not help, please send us the "problematic" file via the Contact Support Form.
I have tested your code and it works correctly for the Notepad.exe file in Windows XP. The problem does not look to be related to TestComplete. As the MSDN Library states,
The GetFileVersion method returns a zero-length string ("") if pathspec does not end with the named component.
The GetFileVersion method works only on the provided path string. It does not attempt to resolve the path, nor does it check for the existence of the specified path.
So, please check:
- whether the path is valid and refers to an existing file.
- whether the file contains valid version info.
If this does not help, please send us the "problematic" file via the Contact Support Form.
Related Content
- 12 years ago
Recent Discussions
- 2 days ago