Sponsored Content
Top Forums Shell Programming and Scripting Stop Window Services with Perl Script Post 302789635 by adisky123 on Thursday 4th of April 2013 03:19:58 AM
Old 04-04-2013
Stop Window Services with Perl Script

Hello All
I am getting an issue which I want to share will all you guys
There is one windiows sercice running on my machine names Network Provisioning Service.

I developed the perl script which do

Code:
$service='Network Provisioning Service';
system('net stop $service');

When I manually stop it works fine, but with the perl script it gives the following error

System error 1060 has occurred.
The specified service does not exist as an installed service.


Can anyone please help me about this, how to resolve this

Regards
Adi
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

temporarily stop cron services

hi can i know what is the command and in which directory to temporarily stop the cron service of my server? here is my server information thanks SunOS statsfs07 5.8 Generic_117000-03 sun4u sparc SUNW,Ultra-4 (1 Reply)
Discussion started by: legato
1 Replies

2. UNIX for Dummies Questions & Answers

Starting & Stop print services in Unix

Hi There Kindly inform me on how to start and stop the print services in Unix from the command line. (2 Replies)
Discussion started by: esh
2 Replies

3. AIX

How to stop perl service

how to stop perl service on AIX? how to find if per service runing? (4 Replies)
Discussion started by: rainbow_bean
4 Replies

4. Shell Programming and Scripting

How to stop a script running in remote server from local script

Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Discussion started by: mannepalli
1 Replies

5. Shell Programming and Scripting

Perl Pattern Matching:Unix Vs. Window (Is it OS dependent??)

Hi All, Below I am discussing the problem I am facing while using pattern matching in Unix & Window. Plz hv a look into it. ================ my $s="UPDATE A SET s="klkkk' ;" ; if ( $s =~ m/^*UPDATE+/i ) { print $s; } else { print "no match";} =================== Both should... (6 Replies)
Discussion started by: Niroj
6 Replies

6. Shell Programming and Scripting

perl window.open without blocker

Hi Everyone, We know that when we open a popup window, if my IE, Yahoo tool bar enable the popup-blocker, then my window will be blocked. like my code. print <<EOD; <script language=JavaScript> var s = new String(window.location.href); if (s.match(/Start/)){ ... (3 Replies)
Discussion started by: jimmy_y
3 Replies

7. Shell Programming and Scripting

I can't stop the scoping problem (perl)

I hate to post something so n00bish, but I'm pretty n00bish when it comes to perl so here it goes: $var=1; while(1){ if ($var == 2){ last; } $var=2; } works the way I intend it to, breaking the infinite loop after the first time through, but: (2 Replies)
Discussion started by: thmnetwork
2 Replies

8. Shell Programming and Scripting

Services Start & stop scripts--help required

Dear All, Pls find my scripts for Agent services strat & stop. EAMSROOT=/opt/panaces export EAMSROOT cd $EAMSROOT nohup ./OracleAgent.sh start & nohup ./PFRAgent.sh start & nohup ./PFR.sh start & nohup ./SolarisOSAgent.sh start & exit 0 EAMSROOT=/opt/panaces export EAMSROOT cd... (0 Replies)
Discussion started by: starnaresh
0 Replies

9. Shell Programming and Scripting

[Perl + Gtk2] Image disappears after scrolling / minimizing window

Hello everyone I don't know if it's the right place to ask, but I will try. I want to use Gtk2 in my Perl chart-drawing script, I found a sample code that could be very useful for me somewhere, but I noticed there is one problem with that - when I draw something, and then scroll the window or... (0 Replies)
Discussion started by: xqwzts
0 Replies

10. Shell Programming and Scripting

Script to Start services based on dependent services on other AIX machine

Hi, I just started working on a script. After my research, i found a command which can help me: AIM: To build a script which starts the services (Services 1) on server 1 automatically whenever its down. And it has a dependency on other service (Service 2) on Server 2. So my script has to... (4 Replies)
Discussion started by: draghun9
4 Replies
Net::DBus::Service(3pm) 				User Contributed Perl Documentation				   Net::DBus::Service(3pm)

NAME
Net::DBus::Service - Provide a service to the bus for clients to use SYNOPSIS
package main; use Net::DBus; # Attach to the bus my $bus = Net::DBus->find; # Acquire a service 'org.demo.Hello' my $service = $bus->export_service("org.demo.Hello"); # Export our object within the service my $object = Demo::HelloWorld->new($service); ....rest of program... DESCRIPTION
This module represents a service which is exported to the message bus. Once a service has been exported, it is possible to create and export objects to the bus. METHODS
my $service = Net::DBus::Service->new($bus, $name); Create a new service, attaching to the bus provided in the $bus parameter, which should be an instance of the Net::DBus object. The $name parameter is the qualified service name. It is not usually neccessary to use this constructor, since services can be created via the "export_service" method on the Net::DBus object. my $bus = $service->get_bus; Retrieves the Net::DBus object to which this service is attached. my $name = $service->get_service_name Retrieves the qualified name by which this service is known on the bus. AUTHOR
Daniel P. Berrange COPYRIGHT
Copyright (C) 2005-2011 Daniel P. Berrange SEE ALSO
Net::DBus, Net::DBus::Object, Net::DBus::RemoteService perl v5.14.2 2011-06-30 Net::DBus::Service(3pm)
All times are GMT -4. The time now is 01:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy