Dec-13-2023, 01:08 AM
Hi everyone I have this small script here
which I'm sure a lot of you will probably recognize it
I modified it to look like this
and it works pretty good but it wants to return none
so how can I stop it from doing that
So how do I eliminate the none
any help would be appreciated
which I'm sure a lot of you will probably recognize it
I modified it to look like this
and it works pretty good but it wants to return none
so how can I stop it from doing that
mport win32api propname = 'FileDescription' def get_file_description(windows_exe): language, codepage = win32api.GetFileVersionInfo(windows_exe, '\\VarFileInfo\\Translation')[0] stringfileinfo = u'\\StringFileInfo\\%04X%04X\\%s' % (language, codepage, 'FileDescription') stringfileinfo2 = u'\\StringFileInfo\\%04X%04X\\%s' % (language, codepage, 'FileVersion') description = win32api.GetFileVersionInfo(windows_exe, stringfileinfo) description2 = win32api.GetFileVersionInfo(windows_exe, stringfileinfo2) print('Name:', description) print('Version:', description2) with open(r'Program_Recovery2_Selection.txt', 'r') as file: file4 = file.read().replace('\n', "") file.close() path = r'\\MyCloudPR4100\Programs\Specialty tools' # program = r'\ccsetup551.exe' # ccsetup551.exe print(get_file_description(path + file4))I have been using CCleaner for this experiment hears what it returns
Quote:Name: CCleaner Installer
Version: 5.51.0.6939
None
So how do I eliminate the none
any help would be appreciated