Visual Basic.NET
  Home arrow Visual Basic.NET arrow Page 4 - WMI Programming with Visual Basic.NET: Com...
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 
Actuate Whitepapers 
VeriSign Whitepapers 
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

WMI Programming with Visual Basic.NET: Combining with Windows Services
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 9
    2005-08-08

    Table of Contents:
  • WMI Programming with Visual Basic.NET: Combining with Windows Services
  • Designing and preparing the essentials
  • Implementing the logic
  • Adding the installers and setup
  • Installing, executing and testing the windows 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    WMI Programming with Visual Basic.NET: Combining with Windows Services - Adding the installers and setup


    (Page 4 of 5 )

    The following steps add service installers to your application:

    o       Switch to the design mode of “WMISvc.vb” (or just double click on “WMISvc.vb” in solution explorer).

    o       Right click on the empty space and choose “Add Installer” as shown in the following figure (Fig 2).

    o       You should be able to see “ProjectInstaller.vb” created automatically for you with two components, “ServiceProcessInstaller1” and “ServiceInstaller1”.

    o       Right click on “ServiceProcessInstaller1”, go to properties and change the property “Account” to “LocalSystem” as shown in the following figure (Fig 3).

    The following steps add setup to your application:

    o       Within the Solution Explorer, right click on the solution and go to Add -> New project.

    o       Select Project Type as “Setup and Deployment Projects” and Templates as “Setup Project”.

    o       Provide name as “WMIServiceSetup” and store at your location (generally I store it within the same path of “WMIService”) as shown in the following figure (Fig 4).

    o       From the Solution Explorer, right click on “WMIServiceSetup” and go to Add -> Project Output.

    o       Within the “Add Project Output Group” window, select Project as “WMIService” (which should be there by default) and choose “Primary Output” in the listbox below. Finally click OK.

    o       From the Solution Explorer, right click again on “WMIServiceSetup” and go to View -> Custom Actions. You will be presented with another tabbed window.

    o       Right click on “Custom Actions” and choose “Add Custom Action”.

    o       Select “File System on Target Machine” from the “Look in” drop down list and click on OK.

    o       It shows “Applicaton Folder” in the drop down list. Select “Primary output from WMIService(Active)” from the listbox and click on OK. And you should be able to see something like the following (Fig 5).

    o       Right click again on “WMIServiceSetup” project and choose Rebuild. The solution should be built successfully (with both projects) at this moment.

    More Visual Basic.NET Articles
    More By Jagadish Chaterjee


       · Hello guys, this is my article on working with WMI together with Windows Services....
       · Very well explained and detailed article. I have tried to build services and the...
       · Hi, can you try with some simple windows services and then go for the article!
     

    VISUAL BASIC.NET ARTICLES

    - 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 ...
    - Overloading and Overriding in Visual Basic.N...
    - More on Controlling Windows Fax Services Usi...
    - Programmatically Controlling Windows Fax Ser...
    - Focusing on Forms and Menus in Visual Basic





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