[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

How to pass a start parameters to Windows Service

(Eric Chong)

9/5/2003 6:12:00 PM

I created a Windows Service in C# that requires to get
passed command arguments like a Console App. I noticed
that there is an option "Start parameters" text box in
the property of a Windows Service in MMC. Is there any
way to get arguments using this option? If possible, what
framework method should I use to get an arguement?
Thanks in advance.

Eric
9 Answers

v-jetan

9/8/2003 1:48:00 PM

0


Hi Eric,

I think you can use WMI to get this property.
For more details, I will do some research for you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Eric Chong" <echong_phx@hotmail.com>
| Sender: "Eric Chong" <echong_phx@hotmail.com>
| Subject: How to pass a start parameters to Windows Service
| Date: Fri, 5 Sep 2003 11:12:02 -0700
| Lines: 9
| Message-ID: <23aa01c373d9$347ab3e0$a101280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNz2TR6u0M+7LjdQrSdpKUorgvuVg==
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:19222
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
|
| I created a Windows Service in C# that requires to get
| passed command arguments like a Console App. I noticed
| that there is an option "Start parameters" text box in
| the property of a Windows Service in MMC. Is there any
| way to get arguments using this option? If possible, what
| framework method should I use to get an arguement?
| Thanks in advance.
|
| Eric
|

v-jetan

9/9/2003 8:31:00 AM

0


Hi Eric,

I found that this post had been posted in several groups.
A member of our team has replied your question in
microsoft.public.dotnet.general
He will follow up you there.
Thanks for you understanding.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Eric Chong" <echong_phx@hotmail.com>
| Sender: "Eric Chong" <echong_phx@hotmail.com>
| Subject: How to pass a start parameters to Windows Service
| Date: Fri, 5 Sep 2003 11:12:02 -0700
| Lines: 9
| Message-ID: <23aa01c373d9$347ab3e0$a101280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNz2TR6u0M+7LjdQrSdpKUorgvuVg==
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:19222
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
|
| I created a Windows Service in C# that requires to get
| passed command arguments like a Console App. I noticed
| that there is an option "Start parameters" text box in
| the property of a Windows Service in MMC. Is there any
| way to get arguments using this option? If possible, what
| framework method should I use to get an arguement?
| Thanks in advance.
|
| Eric
|

Nickname unavailable

6/25/2011 3:45:00 AM

0

On Jun 24, 9:35 pm, Buster Norris <bustyourf...@rocketmail.com> wrote:
> The DemocRAT Hall Of Shamehttp://www.democrathallofsham...
> "Why do you always LIE?"
>
> On Tue, 10 Nov 2009 10:00:24 -0800 (PST), Bret Cahill
>
> <BretCah...@aol.com> wrote:
> >Taxes were too low and interest rates were too high which is what
> >caused the stagflation.
>
> Oops!  CAUGHT LYING, again...
>
> Stagflation is an economic situation in which inflation and economic
> stagnation occur simultaneously and remain unchecked for a significant
> period of time.
>
> Economists offer two principal explanations for why stagflation
> occurs. First, stagflation can result when an economy is slowed by an
> unfavorable supply shock, such as an increase in the price of oil in
> an oil importing country, which tends to raise prices at the same time
> that it slows the economy by making production less profitable. This
> type of stagflation presents a policy dilemma because most actions to
> assist with fighting inflation worsen economic stagnation and vice
> versa. Second, both stagnation and inflation can result from
> inappropriate macroeconomic policies. For example, central banks can
> cause inflation by permitting excessive growth of the money supply,
> and the government can cause stagnation by excessive regulation of
> goods markets and labor markets. Together, these factors can cause
> stagflation; equally, either can, if taken to such an extreme that it
> must be reversed. Both types of explanations are offered in analyses
> of the global stagflation of the 1970s: it began with a huge rise in
> oil prices, but then continued as central banks used excessively
> stimulative monetary policy to counteract the resulting recession,
> causing a runaway wage-price spiral.http://en.wikipedia.org/wiki/S...
>
> Posted from:
> The DemocRATs Hall of Shame!http://www.democrathallof...


do not be to sure of yourself. many economists believe that
stagflation can be caused by monetary expansion and contraction.
nixon cut taxes on the wealthy, and spent like a drunken sailor to
get re-elected in 1972.
note how nixon cut taxes, spent wildly, engaged in war,
and raised interests rates. none of it worked, as all conservative/
libertarian/fascist policies do not work.

http://docs.google.com/viewer?a=v&q=cache:OWaV-4Gmh3IJ:www.fordschool.umich.edu/rsie/workingpapers/Papers451-475/r452.pdf+Robert+Barsky+and+Lutz+Kilian+stagflation&hl=en&gl=us&pid=bl&srcid=ADGEESjp5QyMrVGDLjZ0Cpbw5kdByi9oHlPvUFHuQlSTI4Zf27TOMCV8BDnIGlDJvNSqA2BfGfZvfcfO27RLfZhlCuZzw3sHFaS5qt-2ZYgi9SyosjuoRdueNg8epfOsOUlSumL1fFIj&sig=AHIEtbT1z3kXjxsjZGn-AWSJ...

A Monetary Explanation of the Great Stagflation of
the 1970s

Robert B. Barsky
University of Michigan
and NBER

Lutz Kilian
University of Michigan
and CEPR

January 27, 2000

Abstract – The origins of stagflation and the possibility of its
recurrence continue to be an important
concern among policymakers and in the popular press. It is common to
associate the origins of the Great
Stagflation of the 1970s with the two major oil price increases of
1973/74 and 1979/80. This paper
argues that oil price increases were not nearly as essential a part of
the causal mechanism generating
stagflation as is often thought. We provide a model that can explain
the bulk of stagflation by monetary
expansions and contractions without reference to supply shocks.
Monetary fluctuations also help to
explain variations in the price of oil (and other commodities) and
help to account for the striking
coincidence of major oil price increases and worsening stagflation. In
contrast, there is no theoretical
presumption that oil supply shocks are stagflationary. In particular,
we show that oil supply shocks may
quite plausibly lower the GDP deflator and that there is little
independent evidence that oil supply shocks
actually raised the deflator (as opposed to the CPI). The oil supply
shock view also fails to explain the
dramatic surge in the price of other industrial commodities that
preceded the 1973/74 oil price increase
and the fact that increases in industrial commodity prices lead oil
price increases in the OPEC period.



http://seattletimes.nwsource.com/special/centennial/november/light...


?   In the early 1970s, the U.S. economy was torn between guns and
butter, struggling to pay for the Great Society's social programs
while waging the war in Southeast Asia. Federal deficit spending rose,
as did inflation and interest rates; economic growth slowed and
employment fell. Confronted with "stagflation" -- an extraordinary
combination of rising prices and economic stagnation -- Richard
Nixon's administration cut taxes, raised interest rates and devalued
the dollar in quick succession.
 Nothing worked, and the energy crisis delivered the final, crippling
blow. The world's industrial economy depended on Middle East oil,
quadrupling consumption between 1950 and 1970. But in 1973, U.S.
military support for Israel prompted the Organization of Petroleum
Exporting Countries (OPEC) to embargo crude oil and then to raise
prices. Acute shortages of heating oil and gasoline resulted, and the
price of crude oil skyrocketed. By 1979, it would cost $30 a barrel.

Buster Norris

6/25/2011 4:34:00 AM

0

On Fri, 24 Jun 2011 20:45:26 -0700 (PDT), Nickname unavailable
<Video61@tcq.net> wrote:

> do not be to sure of yourself.............

Shut the fuck up, dumbass................

> nixon... engaged in war

Nixon inherited a democrat war, dumbass..............


Nickname unavailable

6/25/2011 5:11:00 PM

0

On Jun 24, 9:35 pm, Buster Norris <bustyourf...@rocketmail.com> wrote:
> The DemocRAT Hall Of Shamehttp://www.democrathallofsham...
> "Why do you always LIE?"
>
> On Tue, 10 Nov 2009 10:00:24 -0800 (PST), Bret Cahill
>
> <BretCah...@aol.com> wrote:
> >Taxes were too low and interest rates were too high which is what
> >caused the stagflation.
>
> Oops!  CAUGHT LYING, again...
>
> Stagflation is an economic situation in which inflation and economic
> stagnation occur simultaneously and remain unchecked for a significant
> period of time.
>
> Economists offer two principal explanations for why stagflation
> occurs. First, stagflation can result when an economy is slowed by an
> unfavorable supply shock, such as an increase in the price of oil in
> an oil importing country, which tends to raise prices at the same time
> that it slows the economy by making production less profitable. This
> type of stagflation presents a policy dilemma because most actions to
> assist with fighting inflation worsen economic stagnation and vice
> versa. Second, both stagnation and inflation can result from
> inappropriate macroeconomic policies. For example, central banks can
> cause inflation by permitting excessive growth of the money supply,
> and the government can cause stagnation by excessive regulation of
> goods markets and labor markets. Together, these factors can cause
> stagflation; equally, either can, if taken to such an extreme that it
> must be reversed. Both types of explanations are offered in analyses
> of the global stagflation of the 1970s: it began with a huge rise in
> oil prices, but then continued as central banks used excessively
> stimulative monetary policy to counteract the resulting recession,
> causing a runaway wage-price spiral.http://en.wikipedia.org/wiki/S...
>
> Posted from:
> The DemocRATs Hall of Shame!http://www.democrathallof...

see, i fixed it so that the rest can see. shame shame.

do not be to sure of yourself. many economists believe that
stagflation can be caused by monetary expansion and contraction.
nixon cut taxes on the wealthy, and spent like a drunken sailor to
get re-elected in 1972.
note how nixon cut taxes, spent wildly, engaged in war,
and raised interests rates. none of it worked, as all conservative/
libertarian/fascist policies do not work.

http://docs.google.com/viewer?a=v&q=cache:OWaV-4Gmh3IJ:www.fordschool.umich.edu/rsie/workingpapers/Papers451-475/r452.pdf+Robert+Barsky+and+Lutz+Kilian+stagflation&hl=en&gl=us&pid=bl&srcid=ADGEESjp5QyMrVGDLjZ0Cpbw5kdByi9oHlPvUFHuQlSTI4Zf27TOMCV8BDnIGlDJvNSqA2BfGfZvfcfO27RLfZhlCuZzw3sHFaS5qt-2ZYgi9SyosjuoRdueNg8epfOsOUlSumL1fFIj&sig=AHIEtbT1z3kXjxsjZGn-AWSJ...

A Monetary Explanation of the Great Stagflation of
the 1970s

Robert B. Barsky
University of Michigan
and NBER

Lutz Kilian
University of Michigan
and CEPR

January 27, 2000

Abstract – The origins of stagflation and the possibility of its
recurrence continue to be an important
concern among policymakers and in the popular press. It is common to
associate the origins of the Great
Stagflation of the 1970s with the two major oil price increases of
1973/74 and 1979/80. This paper
argues that oil price increases were not nearly as essential a part of
the causal mechanism generating
stagflation as is often thought. We provide a model that can explain
the bulk of stagflation by monetary
expansions and contractions without reference to supply shocks.
Monetary fluctuations also help to
explain variations in the price of oil (and other commodities) and
help to account for the striking
coincidence of major oil price increases and worsening stagflation. In
contrast, there is no theoretical
presumption that oil supply shocks are stagflationary. In particular,
we show that oil supply shocks may
quite plausibly lower the GDP deflator and that there is little
independent evidence that oil supply shocks
actually raised the deflator (as opposed to the CPI). The oil supply
shock view also fails to explain the
dramatic surge in the price of other industrial commodities that
preceded the 1973/74 oil price increase
and the fact that increases in industrial commodity prices lead oil
price increases in the OPEC period.



http://seattletimes.nwsource.com/special/centennial/november/light...


?   In the early 1970s, the U.S. economy was torn between guns and
butter, struggling to pay for the Great Society's social programs
while waging the war in Southeast Asia. Federal deficit spending rose,
as did inflation and interest rates; economic growth slowed and
employment fell. Confronted with "stagflation" -- an extraordinary
combination of rising prices and economic stagnation -- Richard
Nixon's administration cut taxes, raised interest rates and devalued
the dollar in quick succession.
 Nothing worked, and the energy crisis delivered the final, crippling
blow. The world's industrial economy depended on Middle East oil,
quadrupling consumption between 1950 and 1970. But in 1973, U.S.
military support for Israel prompted the Organization of Petroleum
Exporting Countries (OPEC) to embargo crude oil and then to raise
prices. Acute shortages of heating oil and gasoline resulted, and the
price of crude oil skyrocketed. By 1979, it would cost $30 a barrel.

Gary Forbis

6/27/2011 1:33:00 PM

0

On Jun 25, 11:30 am, Beam Me Up Scotty <Then-Destroy-
Everyth...@blackhole.nebulax.com> wrote:
> On 6/24/2011 10:35 PM, Buster Norris wrote:

> > Economists offer two principal explanations for why stagflation
> > occurs. First, stagflation can result when an economy is slowed by an
> > unfavorable supply shock, such as an increase in the price of oil in
> > an oil importing country, which tends to raise prices at the same time
> > that it slows the economy by making production less profitable.
>
> They mean like energy prices "Necessarily skyrocketing"  but Obama has
> said that is what he is doing to promote green energy....

Recovering the cost of production and profits from the consumer
doesn't
increase the cost to anyone but the consumer. Removing the subsidies
for coal and oil doesn't increase their price but merely shifts it to
the
consumer. This makes alternatives more attractive.

Sometimes subsidies help and sometimes they don't. They help if they
are a form of investment used to establish a new lower cost norm.
This
can happen when lots of sunk costs need to be recovered and this
stifles
investment in new technologies. Most of the time subsidies just keep
existing power structures entrenched.

Subsidies can also be used to affect the maket for social good. An
example is medicaid. There are negative externalities from medicaid
but the nation thinks they are worth it to help those in need.

Gary Forbis

6/27/2011 1:33:00 PM

0

On Jun 25, 11:30 am, Beam Me Up Scotty <Then-Destroy-
Everyth...@blackhole.nebulax.com> wrote:
> On 6/24/2011 10:35 PM, Buster Norris wrote:

> > Economists offer two principal explanations for why stagflation
> > occurs. First, stagflation can result when an economy is slowed by an
> > unfavorable supply shock, such as an increase in the price of oil in
> > an oil importing country, which tends to raise prices at the same time
> > that it slows the economy by making production less profitable.
>
> They mean like energy prices "Necessarily skyrocketing"  but Obama has
> said that is what he is doing to promote green energy....

Recovering the cost of production and profits from the consumer
doesn't
increase the cost to anyone but the consumer. Removing the subsidies
for coal and oil doesn't increase their price but merely shifts it to
the
consumer. This makes alternatives more attractive.

Sometimes subsidies help and sometimes they don't. They help if they
are a form of investment used to establish a new lower cost norm.
This
can happen when lots of sunk costs need to be recovered and this
stifles
investment in new technologies. Most of the time subsidies just keep
existing power structures entrenched.

Subsidies can also be used to affect the maket for social good. An
example is medicaid. There are negative externalities from medicaid
but the nation thinks they are worth it to help those in need.

Gary Forbis

6/27/2011 1:33:00 PM

0

On Jun 25, 11:30 am, Beam Me Up Scotty <Then-Destroy-
Everyth...@blackhole.nebulax.com> wrote:
> On 6/24/2011 10:35 PM, Buster Norris wrote:

> > Economists offer two principal explanations for why stagflation
> > occurs. First, stagflation can result when an economy is slowed by an
> > unfavorable supply shock, such as an increase in the price of oil in
> > an oil importing country, which tends to raise prices at the same time
> > that it slows the economy by making production less profitable.
>
> They mean like energy prices "Necessarily skyrocketing"  but Obama has
> said that is what he is doing to promote green energy....

Recovering the cost of production and profits from the consumer
doesn't
increase the cost to anyone but the consumer. Removing the subsidies
for coal and oil doesn't increase their price but merely shifts it to
the
consumer. This makes alternatives more attractive.

Sometimes subsidies help and sometimes they don't. They help if they
are a form of investment used to establish a new lower cost norm.
This
can happen when lots of sunk costs need to be recovered and this
stifles
investment in new technologies. Most of the time subsidies just keep
existing power structures entrenched.

Subsidies can also be used to affect the maket for social good. An
example is medicaid. There are negative externalities from medicaid
but the nation thinks they are worth it to help those in need.

Patriot Games DemocRATHallofShame.Com?

6/29/2011 2:22:00 PM

0

On Mon, 27 Jun 2011 06:32:48 -0700 (PDT), Gary Forbis
<forbisgaryg@msn.com> wrote:
>On Jun 25, 11:30?am, Beam Me Up Scotty <Then-Destroy-
>Everyth...@blackhole.nebulax.com> wrote:
>> On 6/24/2011 10:35 PM, Buster Norris wrote:
>> > Economists offer two principal explanations for why stagflation
>> > occurs. First, stagflation can result when an economy is slowed by an
>> > unfavorable supply shock, such as an increase in the price of oil in
>> > an oil importing country, which tends to raise prices at the same time
>> > that it slows the economy by making production less profitable.
>> They mean like energy prices "Necessarily skyrocketing" ?but Obama has
>> said that is what he is doing to promote green energy....
>Recovering the cost of production and profits from the consumer
>doesn't increase the cost to anyone but the consumer.

Wrong. Costs have to be paid by providers/manufacturers BEFORE they
have something to sell. Since producing almost any product these days
involves loans upfront to pay for initial costs, and since those loans
have to be paid off with interest, total production costs are LESS
when they involve smaller or no loans and no interest.

>Removing the subsidies for coal and oil doesn't increase their price but
>merely shifts it to the consumer.

Wrong. Of course it increases the price. With ANY subsidy some
portion of the total costs is paid for by taxpayers (mostly the top
10% of taxpayers) which reduces the price of the goods/services to the
market (including the other 90% of taxpayers who benefit from a
reduced price BUT DID NOT CONTRIBUTE to the subsidy.

>This makes alternatives more attractive.
>Sometimes subsidies help and sometimes they don't. They help if they
>are a form of investment used to establish a new lower cost norm.

Translation: You like the Socialist scheme of Robin Hood Economics
where we TAKE from the Rich and GIVE to your favorite
companies/industries so their resulting products/services are cheaper.

>This
>can happen when lots of sunk costs need to be recovered and this
>stifles investment in new technologies.

Not exactly. Venture capitalists are not really any different than
any other investor. They put their money into something ONLY BECAUSE
they want toget it back PLUS PROFIT. Obviously, the quicker costs are
recovered the quicker profit is seen...


--
The DemocRATs Hall of Shame?!
http://www.democrathallof...

6/19/11: Galleries Updated! Over 400 New Cartoons, Pics...

4/8/11: Clipboard Manager v3.5.1! (Still FREE!)
Added Spam Warnings!

FREE Windows? Screensavers! Muzzy Screensaver, 15Mb; DemocRAT Screensaver, 18Mb!

FREE Windows? Gadgets! Including: Bumpersticker Slideshow, Obama
Cartoon Slideshow, Take Back America 2010 & 2012!, Are DemocRATs
Ugly?, Is Helen Thomas Ugly?, Is Nancy Pelosi Ugly?, Disco Muzzy
(1 & 2)!, Obama's Lies!, "Uh-Oh! Something's Burning!", and the
Racial Slur Database.

Learn the TRUTH about: BSWS, Bob LeChevalier, Bret Cahill, Brian Wraith,
Chom Noamsky, Clams Casino, Cop Welfare, Curly Surmudgeon, Dakota,
Dave Fritzinger, David Johnston, Freestyle, Gandalf Grey, Iarnrod,
Igor, Joe Steel, Juanjo, Kevin Cunningham, Kurt Lochner, Lorad,
Lamont Cranston, Lookout, Lickin Ass' and Fakin' Names, Malcolm Abel,
Lubow, Major Debacle, Michael Coburn, Mitchel Holman, Phlip, Peter
Principle, Ramon Herrera, Ramrod, Ray Fischer, Rightardia, RobW, Rod
Speed, Roneal, Sanders Kaufman, Scotius, ShittingDuck, Sid9, SilentOtto,
Siobhan Medeiros, Snakehawk, Spike Lee, Stile4aly, Tab182, Tater Gumfries,
Tim Crowley, Tim Howard, Tom Sr, Tom Wheat