?
Solved

Win NT Service

Posted on 2003-03-21
6
Medium Priority
?
171 Views
Last Modified: 2010-04-04
Okay, here's the problem.

I want to make a VERY SIMPLE TServerSocket which

1. Retrieves a Text "Hello" and,
2. the TServerSocket simply ServerSocket1.Socket.SendText('Yes'),
3. And some TClientSocket in other computer do this
   if ClientSocket1.Socket.ReceiveText='YES' then begin
     { Popup a dialog saying "Welcome" }
   end;

The problem is
1. How do I install the ServerProgram automatically in my NT Server (logically it's the first computer that's turned on in the morning).
2. I've read some TService in D5, RegisterServiceProcess, etc, etc. But I still don't get it.

Thanks for your time.
I really appreciate your help.
0
Comment
Question by:tcomponent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Accepted Solution

by:
emadat earned 172 total points
ID: 8181370
Do the following:

- Open your Control Panel
- Open "Scheduled Tasks"
- Double clik on "Add Scheduled Task"
- Browse for your Socket Server exe.
- Select "When My Computer Starts"
- Provide the required credentials

That's all

Emad
0
 

Assisted Solution

by:epaulson
epaulson earned 164 total points
ID: 8182236
Aside from writting the app as an NT Service, you can probably use SRVANY from NT's resource kit. It allows you to setup a user defined service without having to design the app as a service. Here's a link explaining it:

http://support.microsoft.com/default.aspx?scid=KB;en-us;q137890
0
 
LVL 9

Assisted Solution

by:tkalchev
tkalchev earned 164 total points
ID: 8211404
If you want to create WinNT service, you can create it very simple, using Delphi 5+

File->New->Service Application

Drag a ServerSocket Component into the newly created Service1.

On the ServerSocket ClientConnect event handler implement the logic, that you want.

Set the appropriate port of the ServerSocket ( let's say 10100 ).

Set the Active property of the ServerSocket to true.

Set DisplayName of Service1 Component to something meaningly ( e.g. 'WelcomeService' );

Save and Build the Application.

Run the Application with parameter /install.

You get a popup 'Service installed successfully'.

Now you can manage the service start/stop and startup mode from the Services applet.

Enjoy.

0
 

Expert Comment

by:CleanupPing
ID: 9316641
tcomponent:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question