Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2173
  • Last Modified:

register service application XP

i have created a service application in D7, i want to register it as a service on my computer. how do i do this? i'm running XP, its possible that the service will also be running on 2000.
0
Michael Sterling
Asked:
Michael Sterling
4 Solutions
 
ChristianWimmerCommented:
Do you use TService?
So run your service exe with Admin privileges as followed:
install : "yourservice /install" or
uninstall "yourservice /uninstall"

Also read this article:
http://blog.delphi-jedi.net/2008/04/05/how-to-un-install-and-start-a-service-object
0
 
Michael SterlingWeb Applications DeveloperAuthor Commented:
ok so when that's done how do i get it to show up in the Services window?
0
 
Michael SterlingWeb Applications DeveloperAuthor Commented:
sorry my question should be, how do i name it while i'm running the install command (what's the syntax) so that it doesn't just show up as "Service1" in the services window
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
JohnjcesCommented:
I am a little confused, but I 'think' you want to be able to install the service you created in Delphi 7 by some other Delphi application. Is that correct? If so...

if shellexecute(handle, nil, Pchar('C:\ServicePath\YourServiceName.exe'), PChar('/install /silent'), nil, SW_SHOW)< 32 then
     begin
       ShowMessage('Unable to find the service executable to install!');
      exit;
     end;

Responding to your question clarification, you name the service application's service name when you created the service in Delphi under the service "forms" Name.

Say you have a service application you created called MyService. You should go to the object inspector and under your Myservice: TMyservice you should see Name where you name the service. You can also set the DisplayName here as well Such as, 'My database service'.

Hope I helped somehow. Still confused a bit.

John

John
0
 
ChristianWimmerCommented:
You can name your service by changing the name property of your service object. I think it is
Service1.DisplayName := 'name';
0
 
ziolkoCommented:
if you want install service programatically see one of my PAQs:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_23755709.html

if you want to install it from command line open cmd window then type in path and exe name of your service with /install swtich, for example:

c:\myprojects\Service\TestServiceApp.exe / install

ziolko.
0
 
Geert GOracle dbaCommented:
i object to your deleting behaviour !
it seems you are deleting all your last questions.
even with some good answers !
so either accept your own comment or one of the askers.
0
 
Michael SterlingWeb Applications DeveloperAuthor Commented:
thank you to those who took time back then to respond. my attempt to delete was rude and disrespectful to you who tried to help. your efforts are appreciated and this will not happen again. Thanks and my appologies again...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now