Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Un-/install IntraWeb SA Webservice from another program


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Feb 9, 2018 7:01 AM Last Post By: Chad Hower Threads: [ Previous | Next ]
Jörg Heim

Posts: 71
Registered: 7/24/16
Un-/install IntraWeb SA Webservice from another program  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 5, 2018 5:29 AM
Hallo,

I want to write a simple monitoring program for an IntraWeb SA webservice.
For some functionality I could use Winsvc (Win32 service library).
Unfortunately un-/install is not included.
So I use "sc.exe" and "cmd.exe" in a ShellExcecute call.

// 1.) Install service "myTestService" as admin
retVal := ShellExecute(Handle, 'runas', 'cmd.exe', '/C sc create "myTestService" binpath= C:\...\myService.exe', Nil, SW_HIDE);

// 2.) Uninstall service "myTestService" as admin
retVal := ShellExecute(Handle, 'runas', 'cmd.exe', '/C sc delete "myTestService"', Nil, SW_HIDE);

Question:
1.) Is it ok to install a IntraWeb SA webservice on this way?
2.) Is there a better way e.g. with a delphi class?

Best regards
Chad Hower

Posts: 613
Registered: 3/2/07
Re: Un-/install IntraWeb SA Webservice from another program  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 9, 2018 7:01 AM   in response to: Jörg Heim in response to: Jörg Heim
On 2/5/2018 9:29 AM, Jörg Heim wrote:
I want to write a simple monitoring program for an IntraWeb SA webservice.
For some functionality I could use Winsvc (Win32 service library).
Unfortunately un-/install is not included.
So I use "sc.exe" and "cmd.exe" in a ShellExcecute call.

IW services already support params of their own to install and
uninstall. Is there some reason to not use them?
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02