?
Solved

Win NT Service

Posted on 2003-03-21
6
Medium Priority
?
173 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
4 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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 Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…

593 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