Page 1 of 1
SHA1FileFingerprint(Filename$)
Posted: Tue Feb 02, 2010 8:35 pm
by SFSxOI
For SHA1FileFingerprint(Filename$), Filename$ is the full path to the file, right?
Re: SHA1FileFingerprint(Filename$)
Posted: Tue Feb 02, 2010 8:43 pm
by UserOfPure
Try it with and without!

Re: SHA1FileFingerprint(Filename$)
Posted: Tue Feb 02, 2010 8:47 pm
by SFSxOI
well, thats the problem sort of, it gets a different result with and without the path. So if this is supposed to be a file fingerprint, if the location of the file changes the fingerprint changes too.
Edit: nevermind, I got it straight now. I was looking at two different compiles of the same .exe named the same. I thought I had replaced one but had neglected to do so. My fault. DoH!
Re: SHA1FileFingerprint(Filename$)
Posted: Tue Feb 02, 2010 10:29 pm
by Rook Zimbabwe
I had forgotten this... or more accurately i didn't knwo we had it...
Code: Select all
GOOBER$ = SHA1FileFingerprint("c:\windows\notepad.exe")
Debug "FPRINT = "+GOOBER$
gives me an output of:
FPRINT = 7a90f8b051bc82cc9cadbcc9ba345ced02891a6c
in my windws XP Pro....
Is it the same in other XP Pro??? if not that may be an easy way to check if your programs are installed on a new computer... because you could overwrite that info in your file if it was appended in a location you could access and you could check every time!!!
Could you not???

Re: SHA1FileFingerprint(Filename$)
Posted: Wed Feb 03, 2010 3:34 pm
by SFSxOI
On Windows 7 Ultimate here, for C:\windows\notepad.exe, it gives - f00aa51c2ed8b2f656318fdc01ee1cf5441011a4
I'm not sure if the same file from build to build would be the same. I would expect, well at least my first guess would be, a common file like notepad.exe used in the same build version would be the same at least.
Re: SHA1FileFingerprint(Filename$)
Posted: Wed Feb 03, 2010 4:14 pm
by Rook Zimbabwe
Hmmm... I am thinking this may be right but I thought SOME of the fingerprint was a part of date installed??? Can anyone test this on XP Pro SP3 to doublecheck??? Or Win 7 since we have a FP of that???

Re: SHA1FileFingerprint(Filename$)
Posted: Wed Feb 03, 2010 6:49 pm
by Demivec
Rook Zimbabwe wrote:Hmmm... I am thinking this may be right but I thought SOME of the fingerprint was a part of date installed??? Can anyone test this on XP Pro SP3 to doublecheck??? Or Win 7 since we have a FP of that???
My fingerprint matches yours Rook, for Win XP Home sp3.
Strange, that would make us twins (or I'm a clone).

Re: SHA1FileFingerprint(Filename$)
Posted: Wed Feb 03, 2010 7:33 pm
by Rook Zimbabwe
Dang... another good idea wasted
@ Jared... I get to be the EVIL twin!!!

Re: SHA1FileFingerprint(Filename$)
Posted: Wed Feb 03, 2010 7:41 pm
by Demivec
Rook Zimbabwe wrote:@ Jared... I get to be the EVIL twin!!!

@Rook: You were the EVIL twin last time. Now it's my turn to write buggy code and talk with a Texas axcent.

Re: SHA1FileFingerprint(Filename$)
Posted: Thu Feb 04, 2010 8:09 pm
by Rook Zimbabwe
I only use the Texas twang when I am out of state to confuse the Yankees!!!
Though it is a requirement when Texans travel international like!
