Solved

register service application XP

Posted on 2008-10-14
9
2,162 Views
Last Modified: 2012-05-05
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
Comment
Question by:mikesExpertExchange
9 Comments
 
LVL 6

Accepted Solution

by:
ChristianWimmer earned 300 total points
ID: 22716161
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
 
LVL 1

Author Comment

by:mikesExpertExchange
ID: 22716578
ok so when that's done how do i get it to show up in the Services window?
0
 
LVL 1

Author Comment

by:mikesExpertExchange
ID: 22716664
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
ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 
LVL 18

Assisted Solution

by:Johnjces
Johnjces earned 100 total points
ID: 22717709
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
 
LVL 6

Assisted Solution

by:ChristianWimmer
ChristianWimmer earned 300 total points
ID: 22718951
You can name your service by changing the name property of your service object. I think it is
Service1.DisplayName := 'name';
0
 
LVL 21

Assisted Solution

by:ziolko
ziolko earned 100 total points
ID: 22757853
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
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 23313146
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
 
LVL 1

Author Closing Comment

by:mikesExpertExchange
ID: 31506083
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

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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 video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 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