Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing perl in the background

Status
Not open for further replies.

kirk124

Programmer
Apr 15, 2003
26
US
Hi,

Is there a way I can run a perl script in the background without the DOS window popping up.


--thanks
 
If your script is a TK application and your on a windows platform, just rename the file to .wpl

But keep in mind, if your widget uses a dos command in any way a dos prompt will popup.

(EX: if you use the "net use" command, it will popup a dos prompt.
 
By cheating.

Shell your perl command from VB, or VBA as a minimised window.

Are you running the perl script to administer the machine, or should this be a web application?
 
what is .wpl supposed to do? It just asks me for a program to associate with here, and telling it perl still opens a dos-box. Some other kind of windows scripting association?

If you're running something NT-based, you may want to look into registering your script as a system service. Those are run without a user interface.

----------------------------------------------------------------------------------
...but I'm just a C man trying to see the light
 
From icrf's point, you could use svcany.exe from the NT Res Kit, and then use netsvc (or sc) to start the script (or I mean service).

I haven't tested it on a script, and you may have to explicitly stop the service after completion, because svcany.exe will be the application running as a service

HTH
Paul
 
I use wperl.exe (ActivePerl installation) instead of perl.exe when I want the app to stay hidden. Usually works, depends on how big the application is.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top