delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/06/11:44:20

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <200010061542.e96FgXY03129@laxmls02.socal.rr.com>
X-Sender: cloder AT pop-server DOT socal DOT rr DOT com
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0
Date: Fri, 06 Oct 2000 08:45:12 -0700
To: Paul Boniol <CompuPaul AT turbosport DOT com>
From: Chad Loder <cloder AT acm DOT org>
Subject: Re: Starting as Service on NT
Cc: cygwin AT sourceware DOT cygnus DOT com
In-Reply-To: <39DDAC62.A169C55D@turbosport.com>
References: <39DD656F DOT 367CC8F5 AT turbosport DOT com>
<001701c02f59$69a304e0$ff2dacac AT timayum4srqln4>
Mime-Version: 1.0
Note-from-DJ: This may be spam

This is very easy to do, in fact.

Just write the service as you normally would (check out Richter's
book), then add it to your registry in the appropriate place (there's
a registry key somewhere under HKLM where you put the name of the
executable and a couple other params), then in your
Services Control Panel, just go to the "Log On As" section and
put in there under what user context you want the service to
run under.

This can all be done programatically as well, by looking up the
SID of the user and sticking THAT in the registry, although I've
never done it.

Note that a BAT file cannot itself be a service. Windows NT has
a particular API you must implement (called a "Service Control
Program") where you have to respond to events like start-service,
stop-service, and pause-service within a certain amount of time.
However, it's rather trivial to write a C program which invokes
a BAT file via the shell.

	c

At 05:41 AM 10/6/2000 -0500, you wrote:
>From my limited understanding of NT (mostly familiar with 9x), I don't
>think this would work since noone is logged in when the computer
>restarts.  I'm thinking it would have to be something like 9x's AUTOEXEC.BAT
>or a service listed in the registry.  I don't know much about NT specifics.
>Does it do something like AUTOEXEC.BAT?  If it does, would putting Cygwin
>in there stop NT from booting until Cygwin exited?  (Must get some sleep now.
>Hope this made sense.)
>
>Paul
>
>Tim Prince wrote:
>
>> Did you try putting a copy of cygwin.bat in the startup folder?  Or do you
>> mean something else?
>> ----- Original Message -----
>> From: "Paul Boniol" <CompuPaul AT turbosport DOT com>
>> To: <cygwin AT sources DOT redhat DOT com>
>> Sent: Thursday, October 05, 2000 10:38 PM
>> Subject: Starting as Service on NT
>>
>> > I would like to get Cygwin to start automatically as a service
>> > on Windows NT server (i.e., when it boots up) under a particular
>> > user's account.  Anyone know how to do this?
>> >
>> > Thank you,
>> > Paul
>
>
>******
>Get free pop3/imap/web-based e-mail with smtp support, 40 megs of space,
>autoresponders, forwarding, and more at http://www.turbosport.com,
>http://www.webmailcity.com, or http://www.mailplanet.net.
>Also sign up for free paging service!
>******
>To report SPAM mail please send an e-mail to spam AT turbosport DOT com.
>
><a
href="http://click.linksynergy.com/fs-bin/click?id=SZd9To*quJQofferid=19156.
10000002type=1&subid=0" >Be unique at NamePlanet! firstname AT lastname
addresses!</a><IMG border=0 width=1 height=1
src="http://ad.linksynergy.com/fs-bin/show?id=SZd9To*quJQbids=19156.10000002
type=1&subid=0">
>
>
>
>--
>Want to unsubscribe from this list?
>Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
> 



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019