[AccessD] Using MS Access to read the Windows Index

Dan Waters df.waters at comcast.net
Wed Dec 21 13:01:52 CST 2011


Hi Guss,

You can do a lot with FileSystemObject (Microsoft Scripting Runtime).

This is an example of changing the read only property of files in a folder:

'-------------------

    Dim fso As FileSystemObject
    Dim fol As Folder
    Dim fil As File
    Dim filList As Object
    Dim fProperty As Object
    
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set fol = fso.GetFolder(stgFolderPath)
    Set filList = f.Files
    For Each fil In fc
        '-- Set file as read-only
        stgFilePath = stgFolderPath & "\" & f1.Name
        Set fProperties = fso.GetFile(stgFilePath)
        If blnReadOnly = True Then
            fProperties.Attributes = 1
        Else
            fProperties.Attributes = 0
        End If
    Next

'------------------

There is much more you can do with the methods and properties from
FileSystemObject.

HTH,
Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms
Sent: Wednesday, December 21, 2011 12:46 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Using MS Access to read the Windows Index

I don't think it's possible Gus. I don't even think MSFT added an API to
read the index.
Indeed, they made changes to this in Windows 7.
I only saw this in Technet:
The index files have the following protection by default:
    Access Control Lists (ACLs) that only allow the BUILTIN\Administrators
and NT Authority\System users access to the index.
    Index files are lightly obfuscated.

> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com [mailto:accessd- 
> bounces at databaseadvisors.com] On Behalf Of Guss Ginsburg
> Sent: Wednesday, December 21, 2011 12:29 PM
> To: accessd at databaseadvisors.com
> Subject: [AccessD] Using MS Access to read the Windows Index
>
> I have created a folder where I scan documents into searchable pdf 
> files.  I have windows (7 Ultimate) indexing setup to index on the 
> contents, and now I want to write a query that uses the Windows Index 
> file as the recordsource.
> I am hoping to set up this as perhaps a linked table, and build a 
> query that looks something like:
>
>
>
> Select filename, path FROM WindowsIndexFile where IndexedContent =
> mysearchstring1 OR IndexedContent = mysearchstring2; where I am totally
> guessing what the fields are.
>
>
>
> My computer tells me that the index is stored on C:\Program
> Data\Windows,
> but there are a lot of folders under that, and I have no clue about
> where to
> look or what the file is or how to access it.
>
>
>
> Any suggestions appreciated.
>
>
>
> Thanks.
>
>
>
> Sincerely yours,
>
>
>
> Guss Ginsburg
>
> Beechnut Consulting Services
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list