Visual Basic.NET
  Home arrow Visual Basic.NET arrow Page 4 - Managing Windows Indexing Service with Vis...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Managing Windows Indexing Service with Visual Basic.NET using WMI
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 13
    2005-10-19

    Table of Contents:
  • Managing Windows Indexing Service with Visual Basic.NET using WMI
  • How to work with/manage Indexing Service
  • Getting "Indexing service" information with WMI and VB. NET
  • Getting a few other properties of "Indexing service" with WMI and VB. NET
  • Managing "Indexing service" with WMI and VB. NET
  • Passing input parameters to WMI for managing Indexing Service

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Managing Windows Indexing Service with Visual Basic.NET using WMI - Getting a few other properties of "Indexing service" with WMI and VB. NET


    (Page 4 of 6 )

    Once you understand the previous section, there is no doubt that you can understand this section very easily. So, let us go through a few more scripts from the sample solution you downloaded.

    The following script informs you whether the "indexing service" has been started or not.

    Private Sub btnStatus_Click(ByVal sender As System.Object, ByVal
    e As System.EventArgs) Handles btnStatus.Click
            Dim LateBoundObject As ManagementObject
            LateBoundObject = New ManagementObject(Nothing, New
    ManagementPath
    ("\\SERVER\root\CIMV2:Win32_Service.Name=""CiSvc"""), Nothing)
            MessageBox.Show(CType(LateBoundObject("Started"),
    Boolean))
            LateBoundObject.Dispose()
       End Sub

    The above script is very similar to the one provided in the previous section except that I used the property "Started." The property just returns "Boolean" (whether the service started or not).

    The following script informs you of the "start mode" of the "indexing service" (Automatic, Manual or Disabled).

    Private Sub btnStartMode_Click(ByVal sender As System.Object,
    ByVal e As System.EventArgs) Handles btnStartMode.Click
            Dim LateBoundObject As ManagementObject
            LateBoundObject = New ManagementObject(Nothing, New
    ManagementPath
    ("\\SERVER\root\CIMV2:Win32_Service.Name=""CiSvc"""), Nothing)
            MessageBox.Show(CType(LateBoundObject("StartMode"),
    String))
            LateBoundObject.Dispose()
       End Sub

    And I hope you can understand the above code fragment very easily. I just changed the "Started" property to "StartMode".

    More Visual Basic.NET Articles
    More By Jagadish Chaterjee


       · Hello guys...you can now manage indexing service dynamically...just go through the...
     

    VISUAL BASIC.NET ARTICLES

    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek