Here are a couple of examples of code that I have used. I use it to capture
output from scritpts/exe that I run during installation of ancient legacy apps
to capture output into log files.
Example 1:
Here is how I output a windows command use backquote to capture SDTOUT and
STDERR.
@msgs = q
Check the firewall log. If you don't have one you can enable it via the
Control Panel "Security Center" mmc.
C:\windows\pfirewall.log
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, September 12, 2005 5:45 AM
To: perl-win3
You can use the Shell Object.
http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_lunl.mspx
Example in PERL
---
use strict;
use warnings;
use Win32::OLE;
my $fileName = "PutFileNameHere";
my $myDir = "PutDirectoryNameHere";
my $objShell;
#create instance of th
Dave Roth has written a package to that will allow PERL to run as a
service.
http://www.roth.net/perl/Daemon/
Here is the link to a description/doco. You can also download the
package from his web site to install on your PC.
Aaron Tesch
-Original Message-
From: [EMAIL PROTECTED]
[ma
I have had no issues using Net::Telnet on XP Pro that are using the MS
Windows telnet server.
Stating that "it does not work" on Windows server/workstations is not
entirely true.
Try starting the MS Windows telnet server, and using it.
- Aaron
-Original Message-
From: [EMAIL PROTE
ver.'DEBUGtelout');
-Original Message-
From: Jim Guion [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 22, 2005 9:46 AM
To: Aaron.Tesch; perl-win32-users@listserv.ActiveState.com
Subject: RE: :Telnet and Windows Telnet Server --- any alternatives?
I did try it on 2k3 and found:
1 - y
The telnet server that comes with windows work (At least on XP and 2k3).
I don't know about 2000 sever.
The service by default is disabled.
You can enable, and start it via services.msc
I do currently have a working version of a scripted telnet that works on
XP Pro using the build in telnet serv
Are you running XP SP2 or recently upgraded?
You may need to setup your DCOM permissions.
Your ID may not have rights to access the COM objects on your local PC.
Under the "Component Services" mmc you can manage the permissions for
your PC "My computer", or you can manage individual objects.
S
There are 3rd party tools like psexec (sysinternals.com) that will allow you to
run as local system.
You could shell out to execute it from within you PERL App.
- Aaron
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Erik Felton
Sent: Wednesday, Decembe
Perlfaq8 has the necessary details.
http://aspn.activestate.com/ASPN/docs/ActivePerl/lib/Pod/perlfaq8.html#h
ow_can_i_capture_stderr_from_an_external_command
Aaron Tesch
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Cai, Lixin (L.)
Sent: Friday, Oct
You are using a single quote.
2 options.
Use double quotes:
my $outdir = "ldn1dta1\\summitreports\\mark-it\\dev\\";
remove the extra back slashes: either of these should work.
my $outdir = '\\ldn1dta1\summitreports\mark-it\dev\';
my $outdir = 'ldn1dta1\summitreports\mark-it\dev\';
I
You could use the built in perl function stat() to get details about the
file. Create time, modified time, etc you could then compare.
I have included a portion of the perldoc that comes with activeperl 5.6
stat FILEHANDLE
stat EXPR
stat
Returns a 13-element list
MSTask Scheduler, formerly known as the AT scheduler. Can schedule
applications to run on remote systems
The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use
the AT command.
AT [\\computername] [ [id] [/DELE
Another option is to use qx.
qx!dir /s!; #does not display results to the screen
This is useful if you want the results, however you do not want it to
output to the screen. If you want to put it into a variable, and
massage the data.
print qx!dir /s!; #displays the result
I have not had any
Of you could use a single forward slash. Inside of a single quote.
'Z:/bin/perl.exe l_table.pl'
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Chris
Sent: Friday, January 09, 2004 9:34 AM
To: perl-win32-users
Subject: RE: Exec command
Try using back sla
Title: accepting passwords from console apps
I am currently using Term::ReadKey to read in the characters.
With the ReadMode(‘noecho’) I can get a hidden password, however there is no way for my not tech savy client to tell if what they typed actually entered.
My code is an attempt to use R
16 matches
Mail list logo