RE: Checkboxes

2004-01-27 Thread Messenger, Mark
Code: $bitstring=unpack(b16,$flags); print "Bitstring is $bitstring\n"; # 100011101100 for 1414 HTH :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jim Hill Sent: Tuesday, January 27, 2004 1:42 PM To: [EMAIL PROTECTED] Subject: Checkboxes

RE: CGI.pm + redirection

2004-01-26 Thread Messenger, Mark
Try printing the following in your section: print "http://hostname.com/dir/subdir/newfile.html\";>\n"; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Erich Beyrent Sent: Monday, January 26, 2004 1:08 PM To: [EMAIL PROTECTED] Subject: CGI.pm + redirect

RE: How do you find what application has a "lock" on a file or directory?

2004-01-09 Thread Messenger, Mark
It's not in perl, but you might try "handle" from SysInternals: http://www.sysinternals.com/ntw2k/freeware/handle.shtml -Original Message- From: Tony White [mailto:[EMAIL PROTECTED] Sent: Friday, January 09, 2004 12:53 PM To: Perl-Win32-Users (E-mail) Subject: How do you find what appli

RE: MSInstaller

2004-01-02 Thread Messenger, Mark
Code: use Win32::OLE; my $fso = Win32::OLE->new('Scripting.FileSystemObject'); die "No FSO!\n" unless $fso; my $ver = $fso->GetFileVersion("c:\\winnt\\system32\\msiexec.exe"); print "MSIExec.exe version is $ver\n"; HTH. You can substitute "computername\\c\$\\winnt\\system32\\msiex

RE: Stop remote service

2003-12-10 Thread Messenger, Mark
2003 2:18 AM To: Messenger, Mark; Kaufman Eran (StarHome); [EMAIL PROTECTED] Subject: RE: Stop remote service Think you need at least Power User -Original Message----- From: Messenger, Mark [mailto:[EMAIL PROTECTED] Sent: 10 December 2003 08:40 To: Kaufman Eran (StarHome); [EMAIL PROTECTED] S

RE: Stop remote service

2003-12-10 Thread Messenger, Mark
Check out Win32::Service.   And yes, you will, most likely, need Administrator level access on the remote computer to do this.   http://aspn.activestate.com/ASPN/docs/ActivePerl-5.6/site/lib/Win32/Service.html   HTH -Original Message-From: Kaufman Eran (StarHome) [mailto:[EMAIL

RE: MS-Dos and Win32 Console apps

2003-12-02 Thread Messenger, Mark
I believe you can look at the first few bytes of an executable and determine this information. Perhaps this page will be of use to you: http://www.codeguru.com/system/AppType.shtml HTH :) -Original Message- From: Jeremy A [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 8:

RE: Sorting numbers?

2003-12-02 Thread Messenger, Mark
Try the following: foreach $name (@names1) { until (length($name)>5) {$name="0$name";} push(@names2,$name); } undef @names1; #not necessary, but I like to do it, anyway. @names1=sort @names2; Yes, it's dirty. I'm sure a more skilled perler can provide a b

RE: 'Aspell' Module for win2k - activePerl 5.8 needed

2003-11-29 Thread Messenger, Mark
Searching Google for 'aspell' returned this as the second link: http://aspell.net/win32/ Direct download link: http://aspell.net/win32/files/Aspell-0-50-3-3-Setup.exe (Precompiled for Win32, according to the site) Does no one google first anymore? -Original Message- From: Rainer Bru

RE: Pacify user.

2003-11-25 Thread Messenger, Mark
You could change print "." to print "($linecount/100)\r" perhaps? -Original Message- From: Beckett Richard-qswi266 [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 11:37 AM To: '[EMAIL PROTECTED]' Subject: Pacify user. Guys, I've just completed a fantast

RE: Removing double spaces from a file

2003-11-22 Thread Messenger, Mark
Q+DV: while () { s/\s\s/\ /g; print OUT $_; } (Assuming IN is an already open filehandle to the source file, and OUT is one to a destination file.) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 11:

RE: reboot a remote win32 machine

2003-11-17 Thread Messenger, Mark
Which module are you using to do this?   Here's an example with Win32API::Registry  ...   use Win32API::Registry 0.13 qw( :ALL );   $victim="REMOTECOMPUTERNAME"; $seconds=3; $force=0; $rebootaftershutdown=1;   InitiateSystemShutdown($victim,"This machine is going down!", $seconds, $force

RE: compiled perl scripts?

2003-11-03 Thread Messenger, Mark
Odd.  I use PerlApp compiled (packaged) binaries with command line args quite often.  Args appear in @ARGV. I'm running build 635 with an old(er) version of perlapp (v3.0). -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Ilene JonesSent: Mon

RE: compiled perl scripts?

2003-11-03 Thread Messenger, Mark
You might consider the Perl Dev Kit, from Activestate:  http://www.activestate.com/Products/Perl_Dev_Kit/   It's commercial, but relatively cheap: http://www.activestate.com/Products/Perl_Dev_Kit/pricing_and_licensing.plex   And there is a 21-day free trial:  http://www.activestate.com/Produc

RE: How to find the length of a pdf file on the internet

2003-10-30 Thread Messenger, Mark
Have you tried doing a HEAD request?   $ua->head($url, Header => Value,...);    IIRC, this should return a CONTENT_LENGTH value -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of [EMAIL PROTECTED]Sent: Thursday, October 30, 2003 5:38 PMTo: [

RE: 'which' functionality in Perl

2003-09-27 Thread Messenger, Mark
Title: RE: 'which' functionality in Perl Which, along with many other *nix commands, is included in the Unix95 set.  I can email this to you, or you can get it from http://whizzmo.com/unix95.zip (~1meg zip file). -Original Message- From: Dax T. Games [mailto:[EMAIL PROTECTED]] Sent: S

RE: newbie hlelp!

2003-09-15 Thread Messenger, Mark
Title: RE: newbie hlelp! Low tech and sloppy, but functional: @outlines=`"dir $filename /a"`;  # in case file is hidden foreach $_ (@outlines)     {     if (/$filename/i)         {         $moddate=substr($_,0,10);         $modtime=substr($_,12,6);        

RE: script to enumerate window services

2003-09-09 Thread Messenger, Mark
Title: RE: script to enumerate window services On the off chance this has been missed: use Win32::Service; $host=shift; Win32::Service::GetServices($host,\%hashref); foreach $key (sort keys %hashref)     {print "Service: $hashref{$key}   \tDescription: $key\n";} -O

RE: Regex Help Needed

2003-09-02 Thread Messenger, Mark
Equally dirty, but possibly more flexible:   $_='aSdFgHjk';    # Letters to look for. $alpha1=lc(join('',sort(split(//;   $LS_Val=shift; $LS_Val=~s/^-//g;   # Drop preceding dashes   $alpha2=lc(join('',sort(split(//,$LS_Val;   if ($alpha1 eq $alpha2) {print "Pattern found!\n";}      

RE: unlink doesn't

2003-08-29 Thread Messenger, Mark
Title: RE: unlink doesn't Try changing: unlink  $file; to unlink "$logdir\\$file";   HTH :) -Original Message- From: Robert Shields [mailto:[EMAIL PROTECTED]] Sent: Friday, August 29, 2003 9:34 AM To: [EMAIL PROTECTED] Subject: unlink doesn't my $logdir = $Server->Mappat

RE: How to recurse a directory and all files in it

2003-08-04 Thread Messenger, Mark
Title: RE: How to recurse a directory and all files in it $topdir="c:\\";  #your dir here! @files=`"dir $topdir /a-d/s/b/on"`; foreach $file (@files)     {     chop($file);   #remove \n     #   ... do something with file here...     } -Original Message- From: S

RE: Get time and date for 2 weeks at a time

2003-07-15 Thread Messenger, Mark
Title: RE: Get time and date for 2 weeks at a time A shorter (and sloppier) version... #   Look ma, no modules!    @monlens=(31,28,31,30,31,30,31,31,30,31,30,31); @daynames=('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); ($sec,$min,$hour,$mday,$mon,$year,$w

RE: download patches.

2003-07-08 Thread Messenger, Mark
Title: RE: download patches. SUS is your friend: http://www.microsoft.com/windows2000/windowsupdate/sus/default.asp I run this on a little over 1100 computers and it makes my life sooo much easier. Key points: Web based server management Controlled distribution GPO based (or registry ba

RE: Unsure How To Automate

2003-06-27 Thread Messenger, Mark
Title: RE: Unsure How To Automate You can either: 1)  Have a script sit and watch a directory (or list of directories) on a regular basis (every 30 seconds, every 5 minutes, ...) and process files as they come in,  or 2)  Have a script wait for Filesystem change events using Win32::Change

RE: 'cron' equivalent for Windows

2003-06-23 Thread Messenger, Mark
Title: RE: 'cron' equivalent for Windows You also might consider "at". E:\code\perl>at /? 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] [/DELETE] | /DE

RE: HElp needed

2003-06-21 Thread Messenger, Mark
Title: RE: HElp needed Okay, I really need to -w -c what I post before hitting 'send'.   the next-t-o-last line should be: else {print "file $item\n";}     -Original Message-----From: Messenger, Mark [mailto:[EMAIL PROTECTED]Sent: Saturday, June 21, 2003 10

RE: HElp needed

2003-06-21 Thread Messenger, Mark
Title: RE: HElp needed @arry=`ls $dir`; foreach $item (@arry)     {     if (-d "$dir/$item") {print "dir http://mysite.com/cgi-bin/myscript.pl?dir=$item\">$item\n";}     else {print "file $item\n";     } Is this close to what you're looking for?  No CGI.pm needed. -O

RE: Configuring Power Management Settings

2003-06-18 Thread Messenger, Mark
Title: RE: Configuring Power Management Settings #include ; This is (usually) a two-part process: 1) Disable any BIOS power management via your CMOS setup interface. 2) Disable power management in Windoze. Try Setting the following: HKEY_USERS\\userssidgoeshere\\Control Panel\\PowerCf

RE: Windows NT Service

2003-06-14 Thread Messenger, Mark
SysInternals' 'psservice' would be my guess.   Usage:   Usage: psservice [\\Computer [-u Username [-p Password]]]   Example:  psservice \\marklap -u wench -p dungeon stop messenger     You can get it here: http://www.sysinternals.com/ntw2k/freeware/psservice.shtml       -Original M

RE: Problem Using 'unlink' within Script

2003-06-10 Thread Messenger, Mark
Title: RE: Problem Using 'unlink' within Script Hmm... I use 5.6.1 (635) on W2k and use unlink with escaped slashes "\\" all the time.  Odd. -Original Message- From: Maraglia, Dominicx [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 10, 2003 3:43 PM To: James E Keenan; Perl-Win32-User

RE: bugbear virus

2003-06-06 Thread Messenger, Mark
Title: RE: bugbear virus No, but I do get a lot of Nigeria/"419 Scam" emails from this list.    Anyone else have this issue? -Original Message- From: Martin Moss [mailto:[EMAIL PROTECTED]] Sent: Friday, June 06, 2003 5:30 AM To: [EMAIL PROTECTED] Subject: bugbear virus Anybody els

RE: Disk Space Question

2003-06-06 Thread Messenger, Mark
Title: RE: Disk Space Question I suppose you could crontab a script to run df on the *nix boxen and socket the data over to a listening NT server? \perl\eg\Core\server and \perl\eg\Core\client   may be helpful in constructing the last part.  If not, I can provide demo code. -Original