#147131 - 2005-09-06 04:06 AM
GetFileVersion returning null
|
daniel1982
Getting the hang of it
Registered: 2005-03-23
Posts: 77
Loc: Sydney, Australia
|
Hi All,
any ideas why GetFileVersion is returning nothing in the following piece of code? (The install path exists)
Cheers, Daniel Code:
Case KeyExist("HKEY_LOCAL_MACHINE\Software\Adobe\Acrobat Elements\6.0 \InstallPath") = 1
$InstallPath = ReadValue("HKEY_LOCAL_MACHINE\Software\Adobe\Acrobat Elements\6.0\InstallPath", "") If @ERROR = 0 AND Exist($InstallPath + "\Acrobat Elements.exe") = 1 If Exist($InstallPath + "\Acrobat Elements.exe") = 1 MessageBox("exists: " +GetFileVersion($InstallPath + "\Acrobat Elements.exe") , "Ds", 32) EndIf $AcrobatElementsVersion = GetFileVersion($InstallPath + "\Acrobat Elements.exe") EndIf
Edited by daniel1982 (2005-09-06 04:07 AM)
|
|
Top
|
|
|
|
#147132 - 2005-09-06 04:22 AM
Re: GetFileVersion returning null
|
daniel1982
Getting the hang of it
Registered: 2005-03-23
Posts: 77
Loc: Sydney, Australia
|
I just checked @error, and it returns 1813, "The specified resource type cannot be found in the image file."
I'm not sure what this means though?
|
|
Top
|
|
|
|
#147135 - 2005-09-06 05:55 AM
Re: GetFileVersion returning null
|
daniel1982
Getting the hang of it
Registered: 2005-03-23
Posts: 77
Loc: Sydney, Australia
|
I've checked and it does have a file version number (6.0.0.53).
Les, I'm doing the following to (try) and use FSO:
Code:
Set objFSO = CreateObject("Scripting.FileSystemObject") $test = objFSO.GetFileVersion($InstallPath + "\Acrobat Elements.exe")
However i'm getting an IDispatch pointer runtime error on the line where I assign the version number to $Test....
Is this the correct way to do it?
|
|
Top
|
|
|
|
#147137 - 2005-09-06 06:48 AM
Re: GetFileVersion returning null
|
daniel1982
Getting the hang of it
Registered: 2005-03-23
Posts: 77
Loc: Sydney, Australia
|
Thanks Les,
FSO is getting the version out correctly!
I've even tried hard coding the path with the KiX GetFilVersion function, but it still isn't working...
I'm happy to use FSO, although it would be preferable for me to use KiX, does anyone have any ideas why it's not working?
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1452 anonymous users online.
|
|
|