Running tclsh during WinXP startup? 
Author Message
 Running tclsh during WinXP startup?


We have a Tcl server daemon (no GUI) that receives ::comm messages on a
well-known port and forwards data to a 3rd-party application running on
the same WinXP box.  It runs fine for a logged-in user, but we need it
to start at boot time and be running even when no user is logged in.

I'm aware that we could actually make it a Windows service, but I'm
interested in finding out if there are issues with running tclsh during
WinXP startup (and maybe learn something more about Tcl or WinXP).

One of our developers created some kind of hook in something called MMC,
which I'm not familiar with.  MMC wouldn't launch our .tcl file
directly, so he wrote a 2-liner javascript to launch the .tcl file.  The
javascript works when logged in, but not at startup.  We are certain
it's running at startup, because if we change the launch command to
something erroneous, we get the dialog box during startup.

The server creates a log file when it runs, and that log file isn't
being created.  Since launching the javascript launches the server when
we're logged in, and we're certain the javascript is running at startup,
then something must be preventing the server from running during
startup.  We have checked the sequence, and the javascript *is* being
run *after* networking has been established.

Any ideas?

The developer suggested making the server a starpack.  I think that
would work, but I want to know what's going on first.

Sat, 13 Sep 2008 23:29:25 GMT  
 Running tclsh during WinXP startup?
I got the platform wrong... it's Windows 2000 Server.

Sun, 14 Sep 2008 01:19:45 GMT  
 Running tclsh during WinXP startup?
Windows itself will not let you do what you describe unless you like
big blue screens. Your best bet is to run it as a service. You do not
have to be logged in for that service to work.


Sun, 14 Sep 2008 09:33:16 GMT  
 Running tclsh during WinXP startup?


> Windows itself will not let you do what you describe

I'm curious *why*, though.  Tclsvc can run Tcl during startup, so I
wonder how it does that (I haven't looked at the source code yet).  Is
it just a matter of having the right waits, catches, and retries so the
app doesn't get ahead of the OS as it loads?

> Your best bet is to run it as a service.

We used Michael Kraus' nice extension to Tclsvc to run it as a service,
and it works just fine.

Mon, 15 Sep 2008 20:10:55 GMT  
 Running tclsh during WinXP startup?
I guess I would have you define "run during startup". Windows loads
things in a certain order and services I believe come last or close to
it. You can "coopt" the boot experience, as I know a defragger that
does that, but when it is done it reboots so Windows can cycle up
correctly. I don't know of anything that can "ride along" the boot
process from initial power up to the login screen.

I am not a Windows boot sequence guru though so I *can* be wrong about
this. I would still say a "service" is what you want.


Tue, 16 Sep 2008 06:53:59 GMT  
 [ 6 post ] 

 Relevant Pages 

1. Tclsh, or Wish, Startup

2. tclsh.rc and related startup issues (on Win NT)

3. Breaking the Ctrl+C abort during startup??

4. Lack of error messages during Tk startup - why?

5. Expect script fails during startup: Please Help!!!

6. Lack of error messages during Tk startup - why?

7. tk_library during startup

8. CHAIN.COM won't run on WinXP


10. running procedure at startup

11. running tclsh from Linux/Windows question

12. Running byte compiled code with tclsh 8.4


Powered by phpBB® Forum Software