Jump to content



Photo

MS indexing Search Engine


  • Please log in to reply
27 replies to this topic

#1 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 03 September 2007 - 10:48 AM

MS indexing Search Engine

Most of you know the MS indexing Search Engine on Win 2000 and later systems.

The Query object of Indexing Service supports methods and properties that allow you to formulate a query and define an ActiveX® Data Objects (ADO) recordset to manage and display the results of the query.

Condition is well that your Indexing Service is running.

Well this can be accessed by the following COM objects :

AutoIt         
Dim $strQuery   ; The text of our query Dim $objQuery   ; The index server query object Dim $rstResults ; A recordset of results returned from I.S. Dim $objField   ; Field object for loop Dim $sRet       ; Retrieve Service State Const $strComputer = "127.0.0.1" ; Initialize error handler $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Retreive the query from the querystring $strQuery = "au3" ; "#filename *.htm" _ServiceState() If StringInStr($sRet,"stopped") Then  MsgBox(0,"State ","Sercice is not Running, I will start it ...")    _ServiceStart() Sleep(1000) Else ; If the query isn't blank then proceed If $strQuery <> "" Then     ; Create our index server object     $objQuery = ObjCreate("ixsso.Query")     ; $objQuery.Catalog = "query://search.microsoft.com/kb"   ; query://hostname/indexname     ; Set it's properties     With $objQuery         .Catalog    = "query://" & $strComputer &"/System"      ; Catalog to query         .Query      = $strQuery     ; Query text         .MaxRecords = 100          ; Max # of records to return         ; What to sort records by.  I'm sorting by rank [d]         ; which is [d]escending by how pertinent Index Server         ; thinks the result is.  This way the most applicable         ; result should be first.         .SortBy = "rank [d]"         ; Which columns to return.  Column names must         ; be the same as the catalog's properties.  Some         ; of them are: contents, filename, size, path,         ; vpath, hitcount, rank, create, write, DocTitle         ; DocSubject, DocAuthor, DocKeywords...         .Columns = "filename, path, vpath, size, write, " _             & "characterization, DocTitle, DocAuthor, " _             & "DocKeywords, rank, hitcount"     EndWith     ; Get a recordset of our results back from Index Server     $rstResults = $objQuery.CreateRecordset("nonsequential")         If @error Then     Msgbox (0,"Error","Service not started")          Exit     EndIf         ; Get rid of our Query object     $objQuery = ""     ; Check for no records     If $rstResults.EOF Then         Consolewrite( "Sorry. No results found." & @CRLF)     Else         ; Print out # of results         Consolewrite("Records # : " & $rstResults.RecordCount & @CRLF)         ; Loop through results         While Not $rstResults.EOF             ; Loop through Fields             ; Formatting leaves something to be desired,             ; but it'll work for now.               For $objField in $rstResults.Fields                 Consolewrite( $objField.Name & " : ")                 Consolewrite( $rstResults.Fields($objField.Name).Value & @CRLF)             Next             ; Spacing between results             Consolewrite( @CRLF)             ; Move to next result             $rstResults.MoveNext         WEnd     EndIf EndIf EndIf Func _ServiceState()     $objWMIService = ObjGet("winmgmts:" & "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2")     $Services = $objWMIService.ExecQuery("Select * from Win32_Service where Name Like 'cisvc%'")         For $objService in $Services     $sRet = ($objService.DisplayName  & " | " & $objService.State)         ;MsgBox(0,"Service State",$sRet)     Next     Return $sRet EndFunc Func _ServiceStart()     $objWMIService = ObjGet("winmgmts:" & "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2")     $Services = $objWMIService.ExecQuery("Select * from Win32_Service where Name Like 'cisvc%'")         For $objService in $Services         $objService.StartService()         MsgBox(0,"Service State","Service Started")     Next EndFunc ;------------------------------ This is a COM Error handler -------------------------------- Func MyErrFunc()   $HexNumber=hex($oMyError.number,8)   Msgbox(0,"COM Error Test","We intercepted a COM Error !"       & @CRLF  & @CRLF & _              "err.description is: "    & @TAB & $oMyError.description    & @CRLF & _              "err.windescription:"     & @TAB & $oMyError.windescription & @CRLF & _              "err.number is: "         & @TAB & $HexNumber              & @CRLF & _              "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _              "err.scriptline is: "     & @TAB & $oMyError.scriptline     & @CRLF & _              "err.source is: "         & @TAB & $oMyError.source         & @CRLF & _              "err.helpfile is: "       & @TAB & $oMyError.helpfile       & @CRLF & _              "err.helpcontext is: "    & @TAB & $oMyError.helpcontext _             )   SetError(1)  ; to check for after this function returns Endfuncƒo݊÷ Ù«­¢+Øì‘‘́„Í½Á”¹…µ•MÉ¥ÁЁM½Á”€¡Ý¥Ñ Ñ¡”Á…Ñ  蘌ÀäÈíMÉ¥ÁÑ̤Ñ¼…¸%¹‘•᥹œM•ÉÙ¥”…Ñ…±½œ¹…µ•MÉ¥ÁЁ …Ñ…±½œ½¸Ñ¡”±½…°½µÁÕѕȸ((˜ŒÀÌØí½‰©‘µ¥¹%L€ô=‰© ɕ…Ñ” ™ÅÕ½Ðí5¥É½Í½™Ð¹%M‘´™ÅÕ½Ðì¤(˜ŒÀÌØí½‰© …Ñ…±½œ€ô€˜ŒÀÌØí½‰©‘µ¥¹%L¹•Ñ …Ñ…±½    å9…µ” ™ÅÕ½ÐíMÉ¥ÁЁ …Ñ…±½œ™ÅÕ½Ðì¤(˜ŒÀÌØí½‰©M½Á”€ô€˜ŒÀÌØí½‰© …Ñ…±½œ¹‘‘M½Á” ™ÅÕ½ÐíŒè˜ŒÀäÈí͍ɥÁÑ̘ŒÀäÈí%¹‘•᥹œM•ÉٕșÅÕ½Ð찁…±Í”¤(˜ŒÀÌØí½‰©M½Á”¹±¥…Ì€ô€™ÅÕ½ÐíMÉ¥ÁЁ͍½Á”™ÅÕ½Ðì(˜ŒÀÌØí½‰©M½Á”¹A…Ñ €ô€™ÅÕ½ÐíŒè˜ŒÀäÈí͍ɥÁÑ̙ÅÕ½Ðìƒo݊÷ Ù«­¢+Øì ½¹™¥Õɕ́ѡ”%¹‘•᥹œM•ÉÙ¥”½¸Ñ¡”±½…°½µÁÕѕȁѼ…Õѽµ…Ñ¥…±±äÍхÉЁ•… Ñ¥µ”Ñ¡”½µÁÕѕȁÍхÉÑ̸€(ìQ¼½¹™¥ÕɔÑ¡”%¹‘•᥹œM•ÉÙ¥”™½Èµ…¹Õ…°ÍхÉаÍ•Ёѡ”Á…É…µ•ѕȁÁ…Í͕Ñ¼Ñ¡”¹…‰±• $µ•Ñ¡½Ñ¼…±Í”É…Ñ¡•ȁѡ…¸QÉՔ¸€(ì5…¹Õ…°ÍхÉЁ¥ÌÑ¡”‘•™…ձЁ͕ÑÑ¥¹œ™½ÈÑ¡”%¹‘•᥹œM•ÉÙ¥”¸((˜ŒÀÌØí½‰©‘µ¥¹%L€ô=‰© ɕ…Ñ” ™ÅÕ½Ðí5¥É½Í½™Ð¹%M‘´™ÅÕ½Ðì¤(˜ŒÀÌØí½‰©‘µ¥¹%L¹¹…‰±• $¡QÉՔ¤ƒo݊÷ Ù«­¢+ØìI•ÑÕɹ́¥¹™½Éµ…Ñ¥½¸…‰½ÕЁ…±°Ñ¡”%¹‘•᥹œM•ÉÙ¥”…Ñ…±½Ì…Ù…¥±…‰±”½¸Ñ¡”±½…°½µÁÕѕȸ((˜ŒÀÌØí½‰©‘µ¥¹%L€ô=‰© ɕ…Ñ” ™ÅÕ½Ðí5¥É½Í½™Ð¹%M‘´™ÅÕ½Ðì¤(˜ŒÀÌØí½‰© …Ñ…±½œ€ô€˜ŒÀÌØí½‰©‘µ¥¹%L¹¥¹‘¥ÉÍÑ …Ñ…±½œ ¤)%˜€ ˜ŒÀÌØí½‰© …Ñ…±½œ¤Q¡•¸(€€€€˜ŒÀÌØí½‰© …Ñ‘´€ô€˜ŒÀÌØí½‰©‘µ¥¹%L¹•Ñ …Ñ…±½œ ¤(€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí …Ñ…±½œ±½…Ñ¥½¸è€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹ …Ñ…±½1½…Ñ¥½¸™…µÀì I1¤(€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí …Ñ…±½œ¹…µ”耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹ …Ñ…±½9…µ”™…µÀì I1¤(€€€%˜€ ˜ŒÀÌØí½‰©‘µ¥¹%L¹%ÍIÕ¹¹¥¹œ¤Q¡•¸€(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí%́ÍѽÁÁ•è€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹%Í …Ñ…±½MѽÁÁ•™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí%́Á…Õ͕è€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹%Í …Ñ…±½A…Õ͕™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí%́ÉÕ¹¹¥¹œè€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹%Í …Ñ…±½IÕ¹¹¥¹œ™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ð핱…啐™¥±Ñ•ȁ½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹•±…å•‘¥±Ñ•É ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí½Õµ•¹Ñ́Ѽ™¥±Ñ•È耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹½Õµ•¹ÑÍQ½¥±Ñ•È™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí¥±Ñ•É•‘½Õµ•¹Ð½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹¥±Ñ•É•‘½Õµ•¹Ñ ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíÉ•Í Ñ•ÍЁ½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹ɕ͡Q•ÍÑ ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí%¹‘•àÍ¥é”耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹%¹‘•áM¥é”™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíA•ɍ•¹Ðµ•ɝ”½µÁ±•є耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹AÑ5•ɝ• ½µÁ±•Ñ”™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíA•¹‘¥¹œÍ…¸½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹A•¹‘¥¹M…¹ ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíA•ÉÍ¥Íѕ¹Ð¥¹‘•à½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹A•ÉÍ¥Íѕ¹Ñ%¹‘•á ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíEՕÉ䁍½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹EՕÉå ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíMхє¥¹™¼è€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹Mхѕ%¹™¼™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíQ½Ñ…°‘½Õµ•¹Ð½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹Q½Ñ…±½Õµ•¹Ñ ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíU¹¥ÅՔ­•䁍½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹U¹¥ÅՕ-•å ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí]½É±¥ÍЁ½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹]½É‘1¥ÍÑ ½Õ¹Ð™…µÀì I1¤(€€€¹‘%˜€)¹‘%˜($% ½¹Í½±•Ýɥє¡ I1¤)]¡¥±”€Ä(€€€€˜ŒÀÌØí½‰© …Ñ…±½œ€ô€˜ŒÀÌØí½‰©‘µ¥¹%L¹¥¹‘9•áÑ …Ñ…±½œ ¤(€€€%˜€ ˜ŒÀÌØí½‰© …Ñ…±½œ¤Q¡•¸(€€€€€€€€˜ŒÀÌØí½‰© …Ñ‘´€ô€˜ŒÀÌØí½‰©‘µ¥¹%L¹•Ñ …Ñ…±½œ ¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí …Ñ…±½œ±½…Ñ¥½¸è€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹ …Ñ…±½1½…Ñ¥½¸™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí …Ñ…±½œ¹…µ”耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹ …Ñ…±½9…µ”™…µÀì I1¤(€€€%˜€ ˜ŒÀÌØí½‰©‘µ¥¹%L¹%ÍIÕ¹¹¥¹œ¤Q¡•¸€(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí%́ÍѽÁÁ•è€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹%Í …Ñ…±½MѽÁÁ•™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí%́Á…Õ͕è€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹%Í …Ñ…±½A…Õ͕™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí%́ÉÕ¹¹¥¹œè€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹%Í …Ñ…±½IÕ¹¹¥¹œ™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ð핱…啐™¥±Ñ•ȁ½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹•±…å•‘¥±Ñ•É ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí½Õµ•¹Ñ́Ѽ™¥±Ñ•È耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹½Õµ•¹ÑÍQ½¥±Ñ•È™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí¥±Ñ•É•‘½Õµ•¹Ð½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹¥±Ñ•É•‘½Õµ•¹Ñ ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíÉ•Í Ñ•ÍЁ½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹ɕ͡Q•ÍÑ ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí%¹‘•àÍ¥é”耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹%¹‘•áM¥é”™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíA•ɍ•¹Ðµ•ɝ”½µÁ±•є耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹AÑ5•ɝ• ½µÁ±•Ñ”™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíA•¹‘¥¹œÍ…¸½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹A•¹‘¥¹M…¹ ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíA•ÉÍ¥Íѕ¹Ð¥¹‘•à½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹A•ÉÍ¥Íѕ¹Ñ%¹‘•á ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíEՕÉ䁍½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹EՕÉå ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíMхє¥¹™¼è€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹Mхѕ%¹™¼™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíQ½Ñ…°‘½Õµ•¹Ð½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹Q½Ñ…±½Õµ•¹Ñ ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíU¹¥ÅՔ­•䁍½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹U¹¥ÅՕ-•å ½Õ¹Ð™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí]½É±¥ÍЁ½Õ¹Ð耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰© …Ñ‘´¹]½É‘1¥ÍÑ ½Õ¹Ð™…µÀì I1¤(€€€€€€€¹‘%˜€(€€€±Í”(€€€€€€€á¥Ð(€€¹‘%˜)]¹ƒo݊÷ Ù«­¢+ØìI•ÑÕɹ́¥¹™½Éµ…Ñ¥½¸…‰½ÕЁ…±°Ñ¡”%¹‘•᥹œM•ÉÙ¥”Í½Á•́™½Õ¹½¸Ñ¡”±½…°½µÁÕѕȸ((˜ŒÀÌØí½‰©‘µ¥¹%L€ô=‰© ɕ…Ñ” ™ÅÕ½Ðí5¥É½Í½™Ð¹%M‘´™ÅÕ½Ðì¤(˜ŒÀÌØí½‰© …Ñ…±½œ€ô€˜ŒÀÌØí½‰©‘µ¥¹%L¹¥¹‘¥ÉÍÑ …Ñ…±½œ ¤)%˜€ ˜ŒÀÌØí½‰© …Ñ…±½œ¤Q¡•¸(€€€€˜ŒÀÌØí½‰© …Ñ‘´€ô€˜ŒÀÌØí½‰©‘µ¥¹%L¹•Ñ …Ñ…±½œ ¤(€€€€˜ŒÀÌØí½‰©M½Á•‘´€ô€˜ŒÀÌØí½‰© …Ñ‘´¹•ÑM½Á” ¤(€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí±¥…Ì耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰©M½Á•‘´¹±¥…Ì€™…µÀì I1¤(€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí፱Ց”Í½Á”耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰©M½Á•‘´¹፱Ց•M½Á”€€™…µÀì I1¤(€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí1½½¸è€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰©M½Á•‘´¹1½½¸€€™…µÀì I1¤(€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíA…Ñ 耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰©M½Á•‘´¹A…Ñ €€™…µÀì I1¤(€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíY¥ÉÑՅ°Í½Á”耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰©M½Á•‘´¹Y¥ÉÑՅ±M½Á”€€™…µÀì I1¤)¹‘%˜(% ½¹Í½±•]ɥє¡ I1¤)Ý¡¥±”€Ä€(€€€€˜ŒÀÌØí½‰© …Ñ…±½œ€ô€˜ŒÀÌØí½‰©‘µ¥¹%L¹¥¹‘9•áÑ …Ñ…±½œ ¤(€€€%˜€ ˜ŒÀÌØí½‰© …Ñ…±½œ¤Q¡•¸(€€€€€€€€˜ŒÀÌØí½‰© …Ñ‘´€ô€˜ŒÀÌØí½‰©‘µ¥¹%L¹•Ñ …Ñ…±½œ ¤(€€€€€€€€˜ŒÀÌØí½‰©M½Á•‘´€ô€˜ŒÀÌØí½‰© …Ñ‘´¹•ÑM½Á” ¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí±¥…Ì耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰©M½Á•‘´¹±¥…Ì€€™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí፱Ց”Í½Á”耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰©M½Á•‘´¹፱Ց•M½Á”€€™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½Ðí1½½¸è€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰©M½Á•‘´¹1½½¸€€™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíA…Ñ 耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰©M½Á•‘´¹A…Ñ €€™…µÀì I1¤(€€€€€€€ ½¹Í½±•Ýɥє ™ÅÕ½ÐíY¥ÉÑՅ°Í½Á”耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí½‰©M½Á•‘´¹Y¥ÉÑՅ±M½Á”€€™…µÀì I1¤(€€€±Í”(€€€€€€€á¥Ð€(€€€¹‘%˜)]

Regards,

ptrex

Edited by ptrex, 10 September 2007 - 03:13 PM.






#2 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 03 September 2007 - 11:53 AM

Condition is well that your Indexing Service is running.

Possible to get it runnig if not...?
Best, randall
[but it does slow down systems a lot, doesn't it?....]

#3 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 03 September 2007 - 12:36 PM

Hi randallc,

Possible to get it runnig if not...?

What do you mean ? You can't get it running ?

but it does slow down systems a lot, doesn't it?....]

Not realy because it only runs when the system is Idle.

regards,

ptrex

#4 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 03 September 2007 - 01:35 PM

Hi,
i can't get it running by script, if someone's computer doesn't already have it running (some of mine don't, ; i could do it manually, but that won't help when I'm not there....)
Best, randall

#5 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 03 September 2007 - 02:03 PM

@randallc

- If the service is not running I can extend the script to check the status of the service and start it if needed.
- Or you can set the service to start automaticallly go to Services - Indexing Service - set it to start up AUTOMATICALLY.

If you want me to extand the script let me know.

regards

pterx

#6 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 03 September 2007 - 02:17 PM

Yes, thanks, that would be useful for other people's computers; I would like it to run automatically for them, too, rather than telling them how to do it manually...
If you can do it easily, thanks,
Randall

#7 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 03 September 2007 - 04:16 PM

@randallc

Updated first post with the check on the service State and / or Starting Service.


Regards,

ptrex

#8 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 03 September 2007 - 09:22 PM

@randallc

Updated first post with the check on the service State and / or Starting Service.
Regards,

ptrex

Many thanks; seems to be working, I'll look..
Randall

#9 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 04 September 2007 - 10:05 AM

@all

For those who are not familiar with the build-in Indexing service in your system.

Have look here on how to activate it : What is MS Indexing Service

Check this on how to set the performance tuning : Regarding the overhead, this is fully configurable as well :
Performance tuning

Check this on how to use the advanced SQL features :
SQL for MS Indexing Service

Furthermore for adding PDF support you can download the addon from here :
PDF iFilter extension
This will add content search on PDF files as well.

Certainly the MS indexing Service is an on of the most undervaluated features in Windows, so far. :)
Let's change this right now. ;)

regards,

ptrex

Edited by ptrex, 04 September 2007 - 01:03 PM.


#10 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 04 September 2007 - 01:05 PM

@all

Added the link to extend your system with the iFilter interface for Adobe PDF content search.

see previous post.

Enjoy !!

ptrex

#11 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 04 September 2007 - 09:29 PM

Hi,
Much more complex, of course than a simple name searching... but if I use it in a script, thanks for putting
_ServiceState(),_ServiceStart() - when a script starts on any given computer, we won't know if indexing on, or performed lately?

1. Can we know when we can start searching? _ServiceCompleted() or IndexingFinishedFirstTime() perhaps? [else we wait 30 mins as we do with MS XP search if indexing has been off?] - or get incomplete results
2. Does this work on Win 9x?
3. It is going to be a new learning exercise just to understand the index and its return; I get only 10 (not 100) files returned if i revert to filename matching only; and only from 19th August, for example, of about 554 matches with my index and search; so I presume it is making
3A) assumptions about best match -which i will have to learn to workaround,
3B) not indexing since 19th August, and this program has not restarted it? - What do you think?
4. what do we know about speed of finding matches?
Thanks, Randall
[PS - for me, the MS info links for info above do not tell how to do this by script in AutoIt? - do they for anyone?]

Edited by randallc, 04 September 2007 - 10:06 PM.


#12 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 05 September 2007 - 07:43 AM

@Randallc

when a script starts on any given computer, we won't know if indexing on, or performed lately?

This is like in any indexing sytem, you can't start untill the index is complete.

1. Can we know when we can start searching?


The status of the index can be monitored through the PC management console.
In there you can see the status of the indexing system, as well as the nr. of docs which are indexed, and how many still to do.
See post 9 where I showed you links to a tutorial on how to do this.

2. Does this work on Win 9x?

No, only available as of Win2K.

3. It is going to be a new learning exercise just to understand the index and its return
3A) assumptions about best match -which i will have to learn to workaround,
3B) not indexing since 19th August, and this program has not restarted it? - What do you think?

It all depends on how good you use the SQL statements of course.

4. what do we know about speed of finding matches?

On my rather old laptop it gets 100 results (looking for the word AU3) as extension and content, in 0.477 Secs.

MS info links for info above do not tell how to do this by script in AutoIt? - do they for anyone?

If you want to start using the MS inidexing Service in AU3, you will have to start at the beginning.
What is MS Indexing Service

regards,

ptrex

Edited by ptrex, 05 September 2007 - 07:49 AM.


#13 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 05 September 2007 - 10:47 AM

h,
Thanks for your input..

The status of the index can be monitored through the PC management console.

I presume you mean this is so difficult to script that it isn't easy even for you! - So I have little hope of getting it going! - my next plan is just to use it as an option for people who know their MS index is working! -nice addition, and thanks!

If you want to start using the MS inidexing Service in AU3
What is MS Indexing Service

I added this to my searchMiner as an option to use for searching, just for a trial..; when I fine-tuned it (not the current version at the link in my sig.. which shows MSIndex way slower), it was only 20-30% slower than my searches for file names only..
I understand the extra benefits if you are searching for content... not in my planning.
best, Randall

Edited by randallc, 05 September 2007 - 10:48 AM.


#14 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 05 September 2007 - 12:54 PM

@Randallc

I presume you mean this is so difficult to script that it isn't easy even for you!

Not realy. But you can't expect me to give you all possibilities in this thread, do you ?

This is the property to check for monitoring the Index status.

If (objQuery.OutofDate = TRUE) Then     ' Report this condition. End if


You will have to do a little digging yourself in order to understand all possibilities.

regards

ptrex

#15 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 05 September 2007 - 09:55 PM

If (objQuery.OutofDate = TRUE) Then     ' Report this condition. End if

Ok, thanks; are you saying that "digging" was available in the links you suggested?; I couldn't see it, and have had no luck on Gooogle for "script configuration MS Index" and similar, except to find that original script you posted (as vbs)... ?
Best, Randall

#16 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 06 September 2007 - 06:53 AM

@Randallc

When I said "digging" I meant start reading the MSDN relating to MS Indexing Service.

As posted in my link post 12.

This contains all information needed to get started.
I know it rather boring to start reading, but that the only descend way to understand what it's about. It includes example scripts as well.

Later on you can start "Googling" some example scripts.

If you have things you can't find I am willing to point you out where to look.

Regards,

ptrex

#17 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 10 September 2007 - 02:01 PM

OK, thanks.
I have added mS Index to search as an option to my SearchMiner front end [filename search only]; PM me if anyone wants, not yet uploaded; you no longer need any index at all; but if MS Index not running, and no generated index, can only search from scriptdirectory and subs..
Best, randall

#18 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 10 September 2007 - 03:02 PM

@randallc :)

Thanks for adding this feature.

But best is to upload the sourcecode otherwise people can't see if they can use it.

In the mean time I will give you some more candy to chew on.

See first post.

Regards

ptrex

#19 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 22 September 2007 - 01:20 PM

@randallc ;)Thanks for adding this feature.
But best is to upload the sourcecode otherwise people can't see if they can use it.
In the mean time I will give you some more candy to chew on.
See first post.
Regards
ptrex

OK,
Low enough bug number that I have posted it now!;
See link to "SearchMiner" in signature..
Best, randall
[If no custom index, list "as you type" only shows files in script directory...; then "Search" gives MSIndex files if running ...]
still faster for both if you go to the Index option and allow the 5-10 minutes;...even if only once..
best,randall

Edited by randallc, 22 September 2007 - 01:22 PM.


#20 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 23 September 2007 - 04:38 PM

@

Thanks for the update !!


regards

ptrex




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users