WIN32_DELETE_SERVICE(3) 1 WIN32_DELETE_SERVICE(3)win32_delete_service - Deletes a service entry from the SCM databaseSYNOPSIS
mixed win32_delete_service (string $servicename, [string $machine])
DESCRIPTION
Attempts to delete a service from the SCM database. Administrative privileges are required for this to succeed.
This function really just marks the service for deletion. If other processes (such as the Services Applet) are open, then the deletion
will be deferred until those applications are closed. If a service is marked for deletion, further attempts to delete it will fail, and
attempts to create a new service with that name will also fail.
PARAMETERS
o $servicename
- The short name of the service.
o $machine
- The optional machine name. If omitted, the local machine will be used.
RETURN VALUES
Returns WIN32_NO_ERROR on success, FALSE if there is a problem with the parameters or a Win32 Error Code on failure.
EXAMPLES
Example #1
A win32_delete_service(3) example
Deletes the dummyphp service.
<?php
win32_delete_service('dummyphp');
?>
SEE ALSO win32_create_service(3), Win32 Error Codes.
PHP Documentation Group WIN32_DELETE_SERVICE(3)
Check Out this Related Man Page
WIN32_START_SERVICE_CTRL_DISPATCHER(3) 1 WIN32_START_SERVICE_CTRL_DISPATCHER(3)win32_start_service_ctrl_dispatcher - Registers the script with the SCM, so that it can act as the service with the given nameSYNOPSIS
mixed win32_start_service_ctrl_dispatcher (string $name)
DESCRIPTION
When launched via the Service Control Manager, a service process is required to "check-in" with it to establish service monitoring and
communication facilities. This function performs the check-in by spawning a thread to handle the lower-level communication with the service
control manager.
Once started, the service process should do 2 things. The first is to tell the Service Control Manager that the service is running. This
is achieved by calling win32_set_service_status(3) with the WIN32_SERVICE_RUNNING constant. If you need to perform some lengthy process
before the service is actually running, then you can use the WIN32_SERVICE_START_PENDING constant. The second is to continue to check-in
with the service control manager so that it can determine if it should terminate. This is achieved by periodically calling
win32_get_last_control_message(3) and handling the return code appropriately.
PARAMETERS
o $name
- The short-name of the service, as registered by win32_create_service(3).
RETURN VALUES
Returns TRUE on success, FALSE if there is a problem with the parameters or a Win32 Error Code on failure.
EXAMPLES
Example #1
A win32_start_service_ctrl_dispatcher(3) example
Check if the service is runnig under the SCM.
<?php
if (!win32_start_service_ctrl_dispatcher('dummyphp')) {
die("I'm probably not running under the service control manager");
}
win32_set_service_status(WIN32_SERVICE_START_PENDING);
// Some lengthy process to get this service up and running.
win32_set_service_status(WIN32_SERVICE_RUNNING);
while (WIN32_SERVICE_CONTROL_STOP != win32_get_last_control_message()) {
# do some work here, trying not to take more than around 30 seconds
# before coming back into the loop again
}
?>
SEE ALSO win32_set_service_status(3), win32_get_last_control_message(3), Win32 Error Codes.
PHP Documentation Group WIN32_START_SERVICE_CTRL_DISPATCHER(3)
I am currently getting the following error on a solaris box : Could not open SCM connectionlaris box:
Would someone be able to help me understand the error as I do not know what a SCM connection is.
thanks
Kristian (1 Reply)
Hi there,
I got a big problem.
For one of our customers I did a website (php) that connects to another machine "A" (server) to machine "B" via expect.
Now he wants that after the the connection with "B" is established, a telnet connection to "C" is opened, and some commands are executed.... (2 Replies)
I have an application service running on an AIX server
Client application is able to connect to the server machine.
Strange thing is
when i do "netstat -a | grep servicename" I get no output
but
when i do "ps -ef | grep service name", I am able to see the service running
I... (1 Reply)
Hi,
Does anyone seen this error before..
kernel: ENOMEM in journal_alloc_journal_head, retrying.
I encounter this problem on IBM eServers where when the above error appears usually the machine is dead or hanged. Unless a hard reboot is been done. Is this something have to do with the memory... (1 Reply)
Hi,
I got a Textfile contains hundreds of lines like this:
3 02 8293820 0 22 22
All I need is this:
293820 0 22 22
So i decided to delete until the first '8' comes up. But how I can realize that? (9 Replies)
Dear All,
I have a standalone desktop with SCO Openserver V 5, this is used to control a machine with custom written software. The problem is that the machine manufacturer has closed shop (bankruptcy) and there is no support on software.
As a precaution I would want to make a complete backup of... (3 Replies)
Hi, everyone. Could you help me with deletion of files, which are 20 minutes old.
I found out how to make deletion for files in that way :
find <dir> -mtime n -exec rm -rf "{}"
Could you offer your suggestions.
Many thanks in advance. (5 Replies)
i want condition .
1. if "service = 100" or "service = 121" and "datetime=today"
MY CODE
if &];
then
echo "Transection LOG"
echo ""
echo "Detail LOG"
echo ""
exit;
fi
but when rub my script. I get error (2 Replies)
Hello,
i have a question.
My problem is that i have a file like:
TEST
JOHN
ADAM
MICHAEL
SEBASTIAN
ANDY
i want find for MICHAEL and want delete lines like this:
TEST (4 Replies)
Hi All, How are you Guys?
I am using the Code
use Win32::IEAutomation;
# Creating new instance of Internet Explorer
my $ie = Win32::IEAutomation->new( visible => 1, maximize => 1);
# Site navigation
$ie->gotoURL('http://www.google.com');... (4 Replies)
I have a file that has the following entries:
+==> FILER LISTING <==
deleting /vol/icm_wks_0363
deleting /vol/icm_wks_0365
deleting /vol/icm_wks_0393
deleting /vol/icm_wks_0394
deleting /vol/icm_wks_0399
deleting /vol/icm_wks_0416
deleting /vol/icm_wks_0494
deleting ... (2 Replies)
Discussion started by: newbie2010
2 Replies
15. Post Here to Contact Site Administrators and Moderators
Hi Administrator,
Please delete the following post as soon as possible.
https://www.unix.com/shell-programming-and-scripting/199817-solved-running-script-remotely-sudo-id.html (8 Replies)