Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

win32_delete_service(3) [php man page]

WIN32_DELETE_SERVICE(3) 						 1						   WIN32_DELETE_SERVICE(3)

win32_delete_service - Deletes a service entry from the SCM database

SYNOPSIS
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 name

SYNOPSIS
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)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Could not open SCM connection

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)
Discussion started by: kristian
1 Replies

2. UNIX for Advanced & Expert Users

Call Telnet From Within A Shell?

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)
Discussion started by: Tubbietoeter
2 Replies

3. UNIX for Dummies Questions & Answers

services

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)
Discussion started by: bryan
1 Replies

4. UNIX for Advanced & Expert Users

Enomem in Journal Retry Error

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)
Discussion started by: killerserv
1 Replies

5. HP-UX

backspace deletion hpux 11i

how i can enable backspace or charector deletion in hpux11i shell prompt. (12 Replies)
Discussion started by: jestinabel
12 Replies

6. Shell Programming and Scripting

sed - delete until char x

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)
Discussion started by: mcW
9 Replies

7. SCO

Make a Copy Entire Hard Disk

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)
Discussion started by: iqbal_siddiqui
3 Replies

8. Shell Programming and Scripting

advanced deletion

How can i delete the contents of the directory except one file? (8 Replies)
Discussion started by: proactiveaditya
8 Replies

9. Shell Programming and Scripting

Files Deletion After 20 Minutes

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)
Discussion started by: KReoN
5 Replies

10. Shell Programming and Scripting

Please Help me. if command

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)
Discussion started by: ooilinlove
2 Replies

11. UNIX Desktop Questions & Answers

Trying to delete a directory pattern-selective deletion

Trying to delete a directory or a file using a pattern-selective deletion (using “*” and “?” ) (4 Replies)
Discussion started by: herberwz
4 Replies

12. Shell Programming and Scripting

sed search pattern and delete lines

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)
Discussion started by: eightball
4 Replies

13. Windows & DOS: Issues & Discussions

Getting Error when using Module Win32::IEAutomation;

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)
Discussion started by: adisky123
4 Replies

14. Shell Programming and Scripting

File order rearrangement /duplicate deletion

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

Need to delete the post

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)
Discussion started by: arjunprathap
8 Replies