nu852 Posted December 9, 2012 Share Posted December 9, 2012 I got a copy of file "taskcomp.dll" from win8 (x86), and place it at c:\temp on win7sp1 (x86). Both ProductVersion & FileVersion show 6.2.9200.16384, when using contextmenu -> property -> detail. But when I use function FileGetVersion of Autoit3 (3.3.8.1), Both ProductVersion & FileVersionIt show 6.1.7600.16385. Moreover, when I use C# FileVersionInfo.GetVersionInfo, Both ProductVersion & FileVersion also show 6.1.7600.16385. How can I get the FileVersion as 6.2.9200.16384 using autoit? Link to comment Share on other sites More sharing options...
BrewManNH Posted December 9, 2012 Share Posted December 9, 2012 How are you attempting to get it right now? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
MilesAhead Posted December 9, 2012 Share Posted December 9, 2012 It sounds like it's picking up the dll installed in your system. My Freeware Page Link to comment Share on other sites More sharing options...
nu852 Posted December 9, 2012 Author Share Posted December 9, 2012 How are you attempting to get it right now?No idea! Link to comment Share on other sites More sharing options...
nu852 Posted December 9, 2012 Author Share Posted December 9, 2012 (edited) It sounds like it's picking up the dll installed in your system.I am not sure! However, I use the full pathname during testing on Autoit & C#, e.g. c:\temp\taskcomp.dll. Edited December 9, 2012 by nu852 Link to comment Share on other sites More sharing options...
nu852 Posted December 9, 2012 Author Share Posted December 9, 2012 Moreover, When I use file "taskbarcpl.dll" for testing in autoit & C#. Autoit shows both ProductVersion & FileVersion being 6.2.9200.16384. But C# shows both ProductVersion & FileVersion being 6.1.7600.16385. The result is different from "taskcomp.dll". Link to comment Share on other sites More sharing options...
BrewManNH Posted December 9, 2012 Share Posted December 9, 2012 Show your code, because you're making no sense with your answers. I asked you how you're retrieving the version with autoit and you reply "I have no idea". How is that even possible? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
nu852 Posted December 10, 2012 Author Share Posted December 10, 2012 (edited) Show your code, because you're making no sense with your answers. I asked you how you're retrieving the version with autoit and you reply "I have no idea". How is that even possible?code attached!"No idea!" means I have no idea about "how to get the product version as 6.2.9200.19384".Test_GetVersions.au3 Edited December 10, 2012 by nu852 Link to comment Share on other sites More sharing options...
BrewManNH Posted December 10, 2012 Share Posted December 10, 2012 I don't see anything glaringly wrong with the script you posted. What are you attempting to determine when getting the file version of the file? By that I mean, are you trying to get the OS the script is running under, the SP #, or something else? I don't have Windows 8 to test this on, so I can't be of much help with that, but perhaps there's another way of going about whatever it is you're trying to do. Always more than one way to skin the cat. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Chimaera Posted December 10, 2012 Share Posted December 10, 2012 I altered it to the system32 folder to find the file and it reports 6.2.9200.16384 (win8_rtm.120725-1247) For both on my system If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
MilesAhead Posted December 10, 2012 Share Posted December 10, 2012 Unless I'm seeing double, you assign 2 different values to the same local variable Func GetVer($pn) Local $vProduct = FileGetVersion($pn, "ProductVersion") Local $vProduct = FileGetVersion($pn, "FileVersion") Local $sVer = $pn & @CRLF & "ProductVersion : " & $vProduct & @CRLF & "FileVersion : " & $vProduct Return $sVer EndFunc BrewManNH 1 My Freeware Page Link to comment Share on other sites More sharing options...
BrewManNH Posted December 10, 2012 Share Posted December 10, 2012 Good catch MilesAhead, I wasn't even paying attention to the variable names. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
MilesAhead Posted December 10, 2012 Share Posted December 10, 2012 I copied and pasted both variable names to another editor. I wanted to make sure my eyes weren't tricking me. Surprisingly Syntax Check Production gives no warning about the redeclaration of the same Local on the very next line. Strange. My Freeware Page Link to comment Share on other sites More sharing options...
BrewManNH Posted December 10, 2012 Share Posted December 10, 2012 If you don't tell Au3Check to check for previously declared variables it will ignore them. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
MilesAhead Posted December 10, 2012 Share Posted December 10, 2012 Ah, that gets it. Thanks. My Freeware Page Link to comment Share on other sites More sharing options...
nu852 Posted December 10, 2012 Author Share Posted December 10, 2012 (edited) What are you attempting to determine when getting the file version of the file? By that I mean, are you trying to get the OS the script is running under, the SP #, or something else?I have a Win8 (x86) under VMWare. I made a Win8 PE with ADK under VMWare Client environment. Moreover, I have added some files from Win8 Setup DVD to the Win8 PE. Several days ago, I had updated the win8 (x86) from Windows Update site.My intention is to compare the product/file version of files between Win8 and Win8PE. Then extract such updated file & it's mui files. Thus, I take some files from win8 (x86), place them on Win7 SP1 Platform (Win7 SP1 is my HOST OS, Win8 is VMware Client environment). Then, write autoit script to test the Product & File Version. Afterward, I find the Product & File Version is different from seen on contextmenu -> property -> detail.Maybe, there is an alternative method to do above job, such as compare md5, etc. Edited December 10, 2012 by nu852 Link to comment Share on other sites More sharing options...
nu852 Posted December 10, 2012 Author Share Posted December 10, 2012 Unless I'm seeing double, you assign 2 different values to the same local variableIt is my mistake. Link to comment Share on other sites More sharing options...
BrewManNH Posted December 10, 2012 Share Posted December 10, 2012 Are you sure that they change when they're updated? You might have more luck with the file's modified date, or even hashing the files and comparing the hashes. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
nu852 Posted December 10, 2012 Author Share Posted December 10, 2012 Are you sure that they change when they're updated? You might have more luck with the file's modified date, or even hashing the files and comparing the hashes.Since I am not sure which files are updated during Windows Update, I think compare Product / File version is a fast method for comparison. Comparing hashing is time- consumed (maybe, this is a last choice). comparing modified date, let me think about it.Thanks yr advice! Link to comment Share on other sites More sharing options...
BrewManNH Posted December 10, 2012 Share Posted December 10, 2012 I just looked in the System32 folder on my computer and I can see the file versions of all the files in there, I can see that some that have been modified on different days still have the same File Version, so that may not be the best indicator that it's been updated. Also, comparing File Versions, creation date and modified date, I can see that some of these files were modified in 2012, but were created in 2009 according to Windows. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator 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