Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Version info not retained in EXE
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows NT
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01606128
Message ID:
01606135
Vues:
66
Hi Carl,

agetfileversion() sometimes doesn't work for some exe's, cause undetermined. So when I get back an empty result from that, I resort to WMI:
** ... snippit
IF EMPTY(lcRet)
	*** we may be against the WinAPI bug that seems to crop up unexpectedly, so try WMI
	loWMISvc = GETOBJECT("winmgmts:\\localhost\root\cimv2")
	loFileCollection = loWMISvc.ExecQuery("select * from CIM_Datafile where Name = '" + STRTRAN(tcPathedFile,"\","\\") + "'")
	IF loFileCollection.COUNT = 1
		FOR EACH loFileObj IN loFileCollection
			lcRet = loFileObj.VERSION
		ENDFOR
	ENDIF

	STORE NULL TO loFileObj,loFileCollection,loWMISvc
ENDIF
hth,

Hank

>Hi Tamar,
>
>I'm using the Visual MaxFrame framework which has a project hook but there's nothing in it that is stripping out the version info. Just a few minutes ago, the version info finally stuck. I made a backup copy of the EXE and compiled again with no changes and the version info was not retained in the EXE. 4 more attempts after that - version info not retained. Every once in a while it sticks but most of the time it does not.
>
>I'm doing the same thing I always did with VFP6 and never saw this with VFP6. Even if I could find out how to add the version info afterwards (if that's possible), I can get by.
>
>
>>>Hi All,
>>>
>>>I have recently updated a VFP6 app to VFP9 and now the version info is not being stored consistently in the EXE file. Sometimes it does but usually it does not.
>>>The File Description, File Version, Product Name, Product Version, Copyright and Language are all blank even though they are defined in the project.
>>>
>>>Is there anything I can do to ensure that this info is retained or is there a way to assign these file attributes after compilation in cases where they are blank?
>>
>>Are you sure you're not doing something (maybe in a projecthook) that clears this info? I've never had a problem having it stick in VFP 9.
>>
>>Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform