Strange behavier

(imported topic written by SystemAdmin)

Im trying to get the version of a file in the Drivers folder of c:\windows\system32, it seems to fail on 64bit systems

the file “HpCISSs2.sys” does exist in the c:\windows\system32\drivers folder

Q: (version of file “hpcisss2.sys” of folder (pathname of system folder & “\DRIVERS”))

E: Singular expression refers to nonexistent object.

Q: pathname of system folder

A: C:\Windows\system32

Q:(pathname of system folder & “\DRIVERS”)

A: C:\Windows\system32\DRIVERS\

Q: exists file “HpCISSs2.sys” of folder “C:\WINDOWS\system32\DRIVERS”

A: False

Q: exists file “C:\WINDOWS\system32\DRIVERS\HpCISSs2.sys”

A: False

Q: number of files of folder “C:\WINDOWS\System32”

A: 2041

Q: number of files of folder “C:\WINDOWS\System32\Drivers”

A: 3

should be 299

http://forum.bigfix.com/attachment.php?item=424&download=1

(imported comment written by jeremylam)

You need to use the “x64 folder” inspector to specifically tell the 32-bit client to look in the 64 bit pathway; otherwise Windows will only show the 32-bit pathway.

Here are the results on my computer:

q: number of files of folder "C:\WINDOWS\System32\Drivers"
A: 14
T: 1.701 ms
I: singular integer
 
q: number of files of x64 folder "C:\WINDOWS\System32\Drivers"
A: 359
T: 43.012 ms
I: singular integer
 
q:  number of files of x32 folder "C:\WINDOWS\System32\Drivers"
A: 14
T: 2.916 ms
I: singular integer

You can also use the “x64 system folder” inspector:

q: number of files of folder "drivers" of system x64 folder
A: 359
T: 41.871 ms
I: singular integer

(imported comment written by SystemAdmin)

Awsome… that worked… I was actually grabbing the version of a file in the system folder

if x64 of operating system then version of file “hpcisss2.sys” of folder “drivers” of system x64 folder else version of file “hpcisss2.sys” of folder “drivers” of system x32 folder

Thank you