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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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: 4 stars4 stars4 stars4 stars4 stars / 11
    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

    - 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...
    - Creating and Drawing a Game Map in VB.NET (F...
    - Working with Classes and Properties for Game...
    - Working with Loops, Arrays, and Collections ...
    - Learning Loops in VB.NET for Game Development
    - Learning VB.NET: Working with Variables, Con...
    - The Basics of VB.NET Through Text Game Devel...
    - Learning VB.NET Through Text Game Development
    - Types of Operators in Visual Basic
    - Operators
    - Understanding Custom Events using Visual Bas...
    - Polymorphism using Abstract Classes in Visua...
    - Shadowing using Shadows in Visual Basic.NET ...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway