BKJ Posted April 13, 2006 Share Posted April 13, 2006 I am looking for a simple script that will get the file version of a particular file and then write the output to a text file on a network share. Can anyone help me with this easy script? I will need to run this on many workstations so the file must be either appended to or a specific file for each machine, ie %computername%.txt, will need to be created. If using a single appended file I will need to have the machine name included in the text file along with the file version. I thank you in advanced. Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 13, 2006 Share Posted April 13, 2006 I am looking for a simple script that will get the file version of a particular file and then write the output to a text file on a network share. Can anyone help me with this easy script? I will need to run this on many workstations so the file must be either appended to or a specific file for each machine, ie %computername%.txt, will need to be created. If using a single appended file I will need to have the machine name included in the text file along with the file version. I thank you in advanced.You can get the file version with FileGetVersion() and then append the status to the file you want using _FileWriteLog() and naming the file via the macro @ComputerName. Have you written any AutoIT code yet? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
BKJ Posted April 13, 2006 Author Share Posted April 13, 2006 (edited) You can get the file version with FileGetVersion() and then append the status to the file you want using _FileWriteLog() and naming the file via the macro @ComputerName. Have you written any AutoIT code yet? No I have not. What I do have is only this:$ver = FileGetVersion("C:\Program Files\MOZILLA FIREFOX\firefox.exe")MsgBox(0, "FireFox Version", $ver)Which I got from the help file. But like I said I need it to go to a file on a network share. Edited April 13, 2006 by BKJ Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 13, 2006 Share Posted April 13, 2006 No I have not. What I do have is only this: $ver = FileGetVersion("C:\Program Files\MOZILLA FIREFOX\firefox.exe") MsgBox(0, "FireFox Version", $ver) Which I got from the help file. Cool, now combine that with writing it to the log file: #include<file.au3> $ver = FileGetVersion("C:\Program Files\MOZILLA FIREFOX\firefox.exe") _FileWriteLog('C:\' & @ComputerName & '_FileVer.log', $ver) In order to use the User Defined Function (UDF) _FileWriteLog(), you have to include the file.au3 file. You get the file version, then the next line writes it to a log file with a date/time stamp. You can run it more than once and it will just keep adding to the file. If you don't want the date/time stamp, change it to FileWriteLine. The log file will be in C:\, but you can edit that as required too... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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