How to read 64-bit executable file version?

Andrey Kondakov andreykondakov at gmail.com
Tue Apr 21 11:42:58 GMT 2009


Well, I guess I confused you a bit, sorry. I use customized samba smbclient
that carries file version inspection functionality fetched from pretty old
samba release. That was done by my former colleague.
I suggest standard smbclient can not perform file version check as publicly
available operation.
Nevertheless, I think similar logic is implemented in nt_printing nodule
where I discovered function
get_file_version.

Is it possible to adopt this one to inspect file version or its logic covers
specific case?

Thanks,

Andrey

On Mon, Apr 20, 2009 at 8:15 PM, Volker Lendecke
<Volker.Lendecke at sernet.de>wrote:

> On Mon, Apr 20, 2009 at 07:50:57PM +0300, Andrey Kondakov wrote:
> > Hi All,
> > I use samba 3.0.24 in order to check file versions on remote hosts using
> > smbclient and version built-in command.
> > Not long ago I started to notice that automatic scripts return errors and
> > the reason was that 64-bit native executables were inspected.
> > For example, iexplore.exe on 64-bit Vista.
> >
> > Error that I got is "PE file [<executable>] wrong machine = 0x..."
> >
> > I suggest 64-bit executables have different header structure and that's
> why
> > I am about to patch my samba, but can not find
> > useful information how to calculate appropriate header offsets and all
> that
> > is relevant.
> >
> > Can somebody help and give guidelines?
>
> What part of Samba would inspect PE files now?
>
> Volker
>


More information about the samba-technical mailing list