Sign in to follow this  
Followers 0
sias

Filegetversion across network

8 posts in this topic

My problem is simple, or so I thought, I have written an update program that checks the current program version, and the version of the program hosted on a server(same network). After the program checks the two versions, it calls a .bat file to do the actual update. My problem is this; when attempting to test the file version from within autoit, it is not able to locate the file on the server.

I am using FileGetVersion("\\Network Group\Share\folder1\folder2\Prog.exe") I have also tried without the Network Group with FileGetVersion("\\Share\folder1\folder2\Prog.exe"). Neither of these are able to locate the file. (I have placed an updated program on a local drive and it works.)

The .bat file works however, using COPY "\\Share\folder1\folder2\prog.exe" "%temp%\prog.exe"

Am I doing something wrong when trying to check the version across the Network using FileGetVersion? I have searched the forums and the only thing I saw was to use InetGet to download the server file to a temp dir, then use filegetversion from there, however I would like for the update to be as clean as possible. I just don't understand how the .bat file would work and the autoit file wouldn't. Any and all help is appreciated.


"The true measure of a man is how he treats someone who can do him absolutely no good."

Share this post


Link to post
Share on other sites



It's not the function, you can verify it can "see" the file using FileExists and you'll see that it's not the function. I think it's that the fields of the information are not presented.

Share this post


Link to post
Share on other sites

try inetgetsource() or reading file in binary and string manipulatiopn... i dont know i never tried this function over a server before i always did it localy.... TCPsend() TCPrecv() ? like if the server sends 'GETVERSION' then the client would sendback 'VERSION#" "'.... i dont know

Share this post


Link to post
Share on other sites

try inetgetsource() or reading file in binary and string manipulatiopn... i dont know i never tried this function over a server before i always did it localy.... TCPsend() TCPrecv() ? like if the server sends 'GETVERSION' then the client would sendback 'VERSION#" "'.... i dont know

huh? what are you on about with inetgetsource() for getting the version of a file via a UNC ?

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

i stand corrected... actually i have no idea i was just babbling lol i thought inetgetsource got the file in binary..

NOW that i have checked the helpfile jos your right no need for that

Share this post


Link to post
Share on other sites

I tried the FileExists() and you were correct, it is able to find it. However, is there a way to get the file version, or does FileGetVersion() not work across networks. I don't mind resorting to using InetGet and downloading it to a temp directory just to check the file version, but doing it that way seems to be slower. Thanks for the quick response though.


"The true measure of a man is how he treats someone who can do him absolutely no good."

Share this post


Link to post
Share on other sites

Hmm.. I think it's because the file does not contain anything related to version that FileGetVersion can find.

I've test one file from the AutoIt installation folder and pasted it on the other machine in our network and checked and it returns 3.3.0.0 and error 0 so it's not the function. If it's a file you've coded and compile you man want to look in the directive "#AutoIt3Wrapper_Res_Fileversion= " maybe "= 1.03" or something.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Hmm.. I think it's because the file does not contain anything related to version that FileGetVersion can find.

I've test one file from the AutoIt installation folder and pasted it on the other machine in our network and checked and it returns 3.3.0.0 and error 0 so it's not the function. If it's a file you've coded and compile you man want to look in the directive "#AutoIt3Wrapper_Res_Fileversion= " maybe "= 1.03" or something.

It is a program I compiled, and It does have the version information (#AutoIt3Wrapper_Res_Fileversion=3.1.7.4), I have tested it locally and it updates just fine, even if I place it on a different Local Drive. It just seems to be when I go over a network (The network is setup on Windows 2003 Server). I have full access to the files, so there is no authenticity issues. I originally assumed that I was mapping the location wrong, but I have tried every possible way I can think of to do it.

[Edit]:

Just placed a different version on my own home network and it worked, so there isn't an issue with FileGetVersion() not working on networks. It must just be my own mistake mapping it, or an issue with my network at work. Thanks for the help Authenticity, I'll keep going at it and see if I can't find out what the issue is on the network.

Edited by Sias88

"The true measure of a man is how he treats someone who can do him absolutely no good."

Share this post


Link to post
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
Sign in to follow this  
Followers 0