WMI Programming with Visual Basic.NET: Combining with Windows Services - Installing, executing and testing the windows service
(Page 5 of 5 )
Take the following steps to install the Windows service.
o From the Solution Explorer, right click on “WMIServiceSetup” and choose install.
o Click Next in the setup wizard.
o Choose the “EveryOne” radio button in the next screen and click on next (you can also choose your own location to install it).
o Click Next again to start the installation.
o After successful installation, it should give the message “WMIServiceSetup has been successfully installed.” Finally, click on close to end up the installation.
Take the following steps to execute the Windows service.
o Go to Start -> Run.
o Type “Services.msc” and press OK.
o Within the list of Services you should be able to see “WMISvc”. Right click on it and choose “start” as shown in the following figure (Fig 6).

o To test whether it has successfully started or not, you can check it using “Event Viewer” from Administration Tools as shown in the following figure (Fig 7).

How do you test it?
- With the list of “Services”, try to stop and start (or even pause and resume) any service which does not harm your routines, like “Indexing Service.” You can do that any number of times for any number of services.
- Open your SQL Server Enterprise manager. If you open your “ServiceHistory” table, you should be able to see all the names of the services along with their status history.
- To record date and time along with service history, add a new column to you table with TIMESTAMP as data type.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |