bobbintb Posted October 8, 2009 Share Posted October 8, 2009 (edited) I am using FileGetVersion but when i used it on firefox it gives me a low number. i looked and what i need is the Product version and not the File version. any way to do this? Ive come up blank so far. Edited October 8, 2009 by bobbintb Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 8, 2009 Share Posted October 8, 2009 You need FileGetVersion(). See helpfile for how to use it .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
bobbintb Posted October 8, 2009 Author Share Posted October 8, 2009 You need FileGetVersion(). See helpfile for how to use it thats what i was using. i need the product version though. not the file version. Link to comment Share on other sites More sharing options...
Raven1 Posted October 8, 2009 Share Posted October 8, 2009 thats what i was using. i need the product version though. not the file version.I don't want to preach or anything like that, especially since this is my first post, but...Rather than someone giving me the answer, I find it more satisfying if I discover the answer myself.The helpfile does explain how you can use the FileGetVersion function to get the ProductVersion. Link to comment Share on other sites More sharing options...
bobbintb Posted October 8, 2009 Author Share Posted October 8, 2009 I don't want to preach or anything like that, especially since this is my first post, but...Rather than someone giving me the answer, I find it more satisfying if I discover the answer myself.The helpfile does explain how you can use the FileGetVersion function to get the ProductVersion.lol! thanks. its been a long day at work. i dont know how i missed that as i was looking over that page quite a bit. Link to comment Share on other sites More sharing options...
Tec Posted October 8, 2009 Share Posted October 8, 2009 (edited) There are two ways to read the Product Version. RegistryKey Uninstall or Win32_Product.First and working with all Software is RegRead Uninstall:#NoTrayIcon Opt("MustDeclareVars", 1) _SoftwareProdukte() Func _SoftwareProdukte($strComputer=@ComputerName) Local $sRegKey1 = "\\" & $strComputer & '\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' Local $iCount1 = 1 While 1 Local $sKey1 = RegEnumKey($sRegKey1, $iCount1) If @error <> 0 Then ExitLoop Local $ProductName = RegRead($sRegKey1 & '\' & $sKey1, 'DisplayName') Local $ProductVersion = RegRead($sRegKey1 & '\' & $sKey1, 'DisplayVersion') If $ProductName <> "" and $ProductVersion <> "" Then ConsoleWrite ($strComputer & " - " & $ProductName & " - Version: " & $ProductVersion & @CRLF) EndIf $iCount1 += 1 WEnd EndFuncOutput: PCxxxx - Mozilla Firefox (3.5.3) - Version: 3.5.3 (de)Or with Win32_Product:$strcomputer = "." $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $strcomputer & "\root\cimv2") $colSoftware = $objWMIService.ExecQuery("Select * from Win32_Product") For $objSoftware in $colSoftware ConsoleWrite( $strcomputer & " - " & $ObjSoftware.Name & " - Version: " &$ObjSoftware.Version & @CRLF ) ;objSoftware.Uninstall() NextHope this help you. Edited October 8, 2009 by Tec Link to comment Share on other sites More sharing options...
Inverted Posted October 8, 2009 Share Posted October 8, 2009 @ Tec He wants to get the product version of a file. Nothing to do with installed programs. Link to comment Share on other sites More sharing options...
Tec Posted October 8, 2009 Share Posted October 8, 2009 Ah Sorry I misunderstand. I think he wants the product version from Firefox and use FileGetVersion to get the product version. My mistake sorry Link to comment Share on other sites More sharing options...
gfunk999 Posted October 8, 2009 Share Posted October 8, 2009 (edited) This works (Examples): MsgBox(0, "", FileGetVersion("C:\Program Files\Mozilla Firefox\firefox.exe","ProductVersion")) MsgBox(0, "", FileGetVersion("C:\Program Files\Mozilla Firefox\firefox.exe","ProductName")) Edited October 8, 2009 by gfunk999 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now