Jump to content

Getting File Versions?


Recommended Posts

As the topic indicates, I'm trying to work out how to get file versions from files remotely located on other servers around the internet. I've tried using something like the following but nothing seems to work:

MsgBox(0,'', FileGetVersion("\\http://mysite.com/test.exe"))
MsgBox(0,'', FileGetVersion("\\http://mysite.com:80/test.exe"))
MsgBox(0,'', FileGetVersion("\\" & TCPNameToIP("http://mysite.com") & "/test.exe"))
MsgBox(0,'', FileGetVersion("\\" & TCPNameToIP("http://mysite.com") & ":80/test.exe"))

What I'm trying to avoid (due to the size involved) is downloading the file using InetGet to a temp directory, then checking its file version. Is there any way I can avoid downloading the file just to check the exe file version?

Link to comment
Share on other sites

http wouldnt be considered a wan.

if it is indeed part of a wan, get a UNC path

\\computerorservername\blah\blah\test.exe

Wow, over 48 hours later, 31 views and not a single reply :)

Link to comment
Share on other sites

Wow, over 48 hours later, 31 views and not a single reply :)

So he complains on a free support forum that no one knows the answer to his obscure question?

I assume that the file version is probably stored in the start or end of an executable somewhere. Try poking around with a hex editor or something to see where it is, then use some method of only getting part of the file (the first x kB or whatever) then run filegetversion or a custom script on the file to get the version.

Link to comment
Share on other sites

Thanks I'm aware of that but it still doesn't work for me across the internet. Maybe I should rephrase my question - does anyone know if FileGetVersion works for getting file versions from files located on web servers?

FileGetVersion will not work for what you are describing. The script would have to be located on the server side where there is local access to the file.

Link to comment
Share on other sites

So he complains on a free support forum that no one knows the answer to his obscure question?

No, just an observation on what I thought would be a relatively easy question. Not much point in calling it a "Help" forum if no one responds...

I assume that the file version is probably stored in the start or end of an executable somewhere. Try poking around with a hex editor or something to see where it is, then use some method of only getting part of the file (the first x kB or whatever) then run filegetversion or a custom script on the file to get the version.

Might be the only way to do it, however, that's beyond what I want to do for the moment.

Link to comment
Share on other sites

Maybe you could make a filecopy for those files check them on your local computer then delete them.

What I'm trying to avoid (due to the size involved) is downloading the file using InetGet to a temp directory, then checking its file version. Is there any way I can avoid downloading the file just to check the exe file version?

Thanks anyway.

Link to comment
Share on other sites

It can be done on a FTP meaning IIS work 100% unless you take it off but sites aren't using a ftp nowadays. But as for Http you can download the first few portion of the file (at least 128kb or 256kb of the file) then view it as a offset which you can take the information off of it.

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

If you request the file with TCP (GET /file HTTP/1.1), a http header is send to you with the size in it.

Thanks Kip, I'll have a play around with this. I knew it could be done using FTP but I gather that would require a username and password first which I wouldn't want sniffed out from a script. Since HTTP requires neither, this may solve my problem.

Link to comment
Share on other sites

Thanks Kip, I'll have a play around with this. I knew it could be done using FTP but I gather that would require a username and password first which I wouldn't want sniffed out from a script. Since HTTP requires neither, this may solve my problem.

Search for a topic called "Telnet help" in chat, after the argument there is a script (mine) which recieves the header (+ the rest of the file).

Edit: Here: http://www.autoitscript.com/forum/index.ph...30&start=30

Edited by Kip
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...