Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Startup Perl program

by radiantmatrix (Parson)
on Aug 19, 2005 at 15:54 UTC ( [id://485188]=note: print w/replies, xml ) Need Help??


in reply to Startup Perl program

I have had similar problems with Perl scripts in the Startup folder. I think it might have to do with certain environment variables (like PATH) not being properly initialized, because the following worked for me. Caveat emptor: I haven't thoroughly diagnosed this; the fix below fixed it, and I didn't investigate any further, YMMV.

@ECHO OFF REM -- this is a .CMD script named 'C:\sperl.cmd' to launch Perl at st +artup. set PERL_BIN=C:\Perl\bin\perl.exe echo == %1 >> C:\startup.log %PERL_BIN% -w %* 1>>C:\startup.log 2>&1

This is called like:

C:\sperl.cmd C:\path\to\script.pl and some args

A file named C:\startup.log is appended to: I have a logon script that erases this file before the Startup folder is ever executed, so you'll have to address that issue as well.

<-radiant.matrix->
Larry Wall is Yoda: there is no try{} (ok, except in Perl6; way to ruin a joke, Larry! ;P)
The Code that can be seen is not the true Code
"In any sufficiently large group of people, most are idiots" - Kaa's Law

Replies are listed 'Best First'.
Re^2: Startup Perl program
by softworkz (Monk) on Aug 24, 2005 at 02:42 UTC
    I had an issue like this one time when running a scheduled task. It had something to do with the account in which it was running under because the script lived on a network share. Make sure "system" has correct rights and try the examples from above. If I remember right I had to have the script on C:\ then do some "net use" to map a drive. At one point I think we used the account that is always logged in at the console? hope that helps

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://485188]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-19 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found