473,811 Members | 3,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Coding Services

Hi !

I wan't to code a service which will be installed on some clients in our
network.
The service should have the following features :

- Scan all properties of the Client (Hardware, Software etc)
- Create a log (eg. logfile.txt)
- Optional : Insert the data directly in an SQL-Database
- All these functions should occur, when a Timer elapsed or when I send a
command to do this.

My problem : Up to the manual command all functions have been implemented.
So, my question is : How can i communicate with these services to do things
when i want them to do ?
For better understanding : The service has started succesfully and is now
waiting for commands like "Start Scan"

Thanks !!!!!

Christoph
Nov 20 '05 #1
4 1261
H Ghrisoph,

In my opinion is all you ask as samples in the resource kit

Using WMI
The service sample has a part for updating the logfile
Data Entry sample shows how to update the database.
And there are more timer samples.

See the links bellow

I hope this helps?

Cor

VB.net Resource kit
http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

And if you have problems installing the resource kit
http://msdn.microsoft.com/vbasic/vbr...q/#installvdir

Another resource for learning is the Quick Starts
http://samples.gotdotnet.com/quickstart/
I hope this helps a little bit?

Cor

Hi !

I wan't to code a service which will be installed on some clients in our
network.
The service should have the following features :

- Scan all properties of the Client (Hardware, Software etc)
- Create a log (eg. logfile.txt)
- Optional : Insert the data directly in an SQL-Database
- All these functions should occur, when a Timer elapsed or when I send a
command to do this.

My problem : Up to the manual command all functions have been implemented. So, my question is : How can i communicate with these services to do things when i want them to do ?
For better understanding : The service has started succesfully and is now
waiting for commands like "Start Scan"

Thanks !!!!!

Christoph

Nov 20 '05 #2
Hi Cor !

thanks for answering my question.
But my only problem is to "trigger" my service to start the scan.
All other functions are already implemented.

Christoph
Nov 20 '05 #3
Hi Chrisoph,

I thought that that was as well in the service sample from the resource kit,
however from that one I am not completly sure.

Cor

thanks for answering my question.
But my only problem is to "trigger" my service to start the scan.
All other functions are already implemented.

Christoph

Nov 20 '05 #4
Christoph,
The easiest way to have a service accept a "command" to do something is to
override the ServiceBase.OnC ustomCommand method and have it call the same
procedure your Timer.Elapsed event handler calls.

Then you can use ServiceControll er.ExecuteComma nd to invoke this custom
command.

Note I would probably define an Enum of CustomCommands that my service
supported so its easier to keep track of them. A custom command for
OnCustomCommand is an integer between 128 & 256, which also means you can
have multiple custom commands defined.

Remember that ServiceControll er can control services on your local machine
as well as services on remote machines. Note you may need to configure the
various machines to allow remote control of services.

An alternative, more flexible method, which also entails more work, is to
enable your service for .NET Remoting. You could either make it a .NET
Remoting Server, in which case you call a method to have it perform some
action, or a .NET Remoting Client, and possible handle an "update data
event" on your server remoting object that says to update data...

Both of the custom commands & remoting with a service are discussed in
Matthew MacDonalds book "Microsoft Visual Basic .NET Programmer's Cookbook"
from MS Press.

Hope this helps
Jay
"Christoph Duesmann" <c.********@web .de> wrote in message
news:O4******** ******@TK2MSFTN GP12.phx.gbl...
Hi !

I wan't to code a service which will be installed on some clients in our
network.
The service should have the following features :

- Scan all properties of the Client (Hardware, Software etc)
- Create a log (eg. logfile.txt)
- Optional : Insert the data directly in an SQL-Database
- All these functions should occur, when a Timer elapsed or when I send a
command to do this.

My problem : Up to the manual command all functions have been implemented. So, my question is : How can i communicate with these services to do things when i want them to do ?
For better understanding : The service has started succesfully and is now
waiting for commands like "Start Scan"

Thanks !!!!!

Christoph

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2315
by: Scott Meddows | last post by:
Does anyone know of a document that Microsoft produces that has the suggested coding standards for naming tables in a Database, fields in a database, objects in a VB project and so on? Maybe one for SQL and one for VB? Thanks!
4
5335
by: Dotnetjunky | last post by:
Hi, So far, I've found tons of documents describing recommended coding standards for C#, but not a single piece on VB.NET yet. Anybody here knows such a coding standards guideline on VB.NET and minds sharing with us ? Thanks in advance.
3
1405
by: Dan Schaertel | last post by:
Does anybody have a good VB coding standards documnet? I need to generate one and I am looking for examples. Thanks email: dschaertel@hotmail.com
2
1284
by: david | last post by:
I have written the Web Services in VBaic .Net. One function interface: DataSet GetAllPatients() which will be called in remote client and return DataSet. I have written the clients by using both C# and VB, and they work fine. Due to some reason, I have to use C++ in .NET IDE. Now I confuss with the use of pointer. I have trouble in coding and compiling. The following is my simple code, anyone could be kind of helping me to figure out the...
52
2997
by: Sergey Zuyev | last post by:
Hello All I work at software company and we are having a really big discussion about coding styles and it seems that more people prefer statement 1 to statement2 , which was a big surprise to me. Please help us with your comments. Thanks Which way is better way 1 or 2? 1. 'set enable status on CheckboxPrimaryYN
3
5635
by: Manuel Alves | last post by:
Hi all, I've got a windows service that depends on some other services. On the project installer I state this by using: Me.myService.ServicesDependedOn = New String() {"Print Spooler", "Net Logon", "Network Connections"} The problem: If the server is not an english version I have to translate the service names. Here is how I do it for portuguese and "other" (english):
1
1799
by: Gale Coleman - LSND | last post by:
ASP, VBscript, IIS 6, Access database Hello, I have a form page that people fill out and push submit. When they push submit, the information is stored in a database in two different tables. You are then directed to a page that lists everything you have submitted so you can print it. I am having problems with this second page. Information from one of the tables is listed, but the information from the other table isn't listed. They...
0
1678
by: pat | last post by:
CodeCheck Coding Standard's Support As a free service to our customers we offer support in developing "rule-files" for automating corporate coding standards. If you have a coding standard that you wish to automate please send the standard to us in PDF format so we can assist in developing the automation with codecheck. If you are developing codecheck rule-files and have a particular
1
4688
by: Jennifer Jazz | last post by:
My question is regarding the mapping of Class diagram to the C++ coding. There are 3 realtions in Class diagram 1) Assosication 2) Composition 3) Aggregation (Weak Composition). -----------------------------------------------------
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10644
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10124
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.