
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2013 11:59 PM
I need to identify all computers that have a certain file under Program Files. Because we have both 32 and 64 bit computers, I included 2 files to search for, example:
%program files%\Common Files\Filea.lic
%program files (x86)\Common Files\Filea.lic
The problem is that on a 32 bit machine with the file C:\Program Files\Common Files\Filea.lic, Lansweeper shows as a match for both of the file searches, hence 2 files found when there is only one. When I run a report it shows 2 entries (matches) for this computer with only one file.
If I only run the search for %program files%\Common Files\Filea.lic, it fails to find the file on 64 bit machines with the true path of C:\Program Files (x86)\Commonm Files\Filea.lic.
Any suggestion on how I can prevent a false positive for "program files" when the variable is "%program files (x86)%"?
Thanks!
%program files%\Common Files\Filea.lic
%program files (x86)\Common Files\Filea.lic
The problem is that on a 32 bit machine with the file C:\Program Files\Common Files\Filea.lic, Lansweeper shows as a match for both of the file searches, hence 2 files found when there is only one. When I run a report it shows 2 entries (matches) for this computer with only one file.
If I only run the search for %program files%\Common Files\Filea.lic, it fails to find the file on 64 bit machines with the true path of C:\Program Files (x86)\Commonm Files\Filea.lic.
Any suggestion on how I can prevent a false positive for "program files" when the variable is "%program files (x86)%"?
Thanks!
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2013 05:29 PM
Perfect! I just tested this and it works as expected. Thank you!

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2013 05:26 PM
You only need the file scan below, which redirects to c:\Program Files\Common Files\Filea.lic on 32-bit machines. You must submit the %programfiles(x86)% parameter exactly as shown below. Note the two percent signs and the lack of spaces in the parameter.
%programfiles(x86)%\Common Files\Filea.lic
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2013 12:41 AM
If you're just looking for FileA.lic, regardless of where it's found, you could probably do something like
Where
( Select
Count(*)
From
tblFileVersions As v
Where
v.Found = 1 -- found...
AND v.FilePathfull Like '%\FileA.lic' -- ...the file we're looking for
AND v.AssetID = tblAssets.AssetID -- ...on the machine we're looking at
) <> 0 -- 1 or more matches found! Bingo!
