473,386 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

WMI - Start a windows service

Rui

Does anyone know how to pass Start Parameters to a service using WMI?

The InvokeMethod on ManagementObject does not work.

Rui
Jul 5 '06 #1
2 3652
You can't. Why would you use WMI for this, the framework has the
ServiceController class for this.
You can also shell-out to the sc.exe utility, which is obviously the easiest
solution.

Willy.

"Rui" <Ru*@discussions.microsoft.comwrote in message
news:8D**********************************@microsof t.com...
|
| Does anyone know how to pass Start Parameters to a service using WMI?
|
| The InvokeMethod on ManagementObject does not work.
|
| Rui
Jul 6 '06 #2
Rui
Thanks

"Willy Denoyette [MVP]" wrote:
You can't. Why would you use WMI for this, the framework has the
ServiceController class for this.
You can also shell-out to the sc.exe utility, which is obviously the easiest
solution.

Willy.

"Rui" <Ru*@discussions.microsoft.comwrote in message
news:8D**********************************@microsof t.com...
|
| Does anyone know how to pass Start Parameters to a service using WMI?
|
| The InvokeMethod on ManagementObject does not work.
|
| Rui
Jul 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bryan | last post by:
We created a Windows Service with C#. The service will start OK on computers that are a member of a domain, but when we try to start it on a server that is configured for a workgroup we get the...
2
by: Mark | last post by:
I created an extremely simple windows service that only writes to the EventLogs on Stop and Pause. I installed it using the InstallUtil.exe program, the output of which is below. It appears to be...
12
by: JSheble | last post by:
I've written a Windows Service using C#, but I cannot seem to figure out how to cancel or prevent the service from starting under certain conditions. For example, in the OnStart I read in some...
5
by: SiD` | last post by:
when starting a windows service writte in vb.net, a messagebox appears: cannot start service from the command line or a debugger. A windows service must first be installed using installutil.exe ...
6
by: Arnie | last post by:
We're using the ServiceController class provided by the .NET Framework, programming in C#. We are using the Start() method to start a service from another service. This works fine most of the...
17
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
3
by: tshad | last post by:
I created a service in VS 2003 and the code works fine as an application, but not as a service. It installs fine, but when I try to start it, it tells me it was unable to start. Am I missing...
7
by: shai | last post by:
I am working at .net 1.1, writing in c#. I have windows service with a COM object. Every unexpected time The COM object throw an error that make my service get stuck (do not respond). I can catch...
4
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a...
9
by: Yasir Zaheer | last post by:
I have made a windows service which is configured to start automatically at the system startup under the USER account type. The service is working perfectly fine when I try to start it manually,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.