Scripting for MOM

2003-03-19 Thread Stanley . G . Martin
Has anyone done any scripting for the Microsoft Operations Manager (MOM)
yet?  I just started to eval it for my group here in Sprint and was
wondering if it was going to be very flexible, where I could add my own
scripts to it.

Stanley G. Martin
Sprint - EIS³ Customer Care
[EMAIL PROTECTED]

<>

RE: LWP Question

2003-01-17 Thread Stanley . G . Martin
Explain IE-specific gar.  It's running on a Win2k box and IIS 5.0

Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services 
[EMAIL PROTECTED]


-Original Message-
From: pedro [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 10:42 AM
To: Stanley.G.Martin
Cc: perl-win32-users
Subject: Re: LWP Question


Quoting [EMAIL PROTECTED]:
> I'm trying to test a report url for an application called
Microstrategy.
> The url has the application login and password embedded in it and I
plug
> this url into a browser, it works fine.  But when I attempt to use
> LWP::Simple or LWP::UserAgent, it doesn't seem to be passing the same
> credentials.  Anybody had any experience with this or something like
it?

Does the website utilize IE-specific gar to make it work properly?

Peter

-- 
Peter A. Peterson II, technician and musician.
---=[ http://tastytronic.net/~pedro/ ]=---
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



LWP Question

2003-01-17 Thread Stanley . G . Martin
I'm trying to test a report url for an application called Microstrategy.
The url has the application login and password embedded in it and I plug
this url into a browser, it works fine.  But when I attempt to use
LWP::Simple or LWP::UserAgent, it doesn't seem to be passing the same
credentials.  Anybody had any experience with this or something like it?

Stanley G. Martin
Sprint - EIS³ Customer Care
[EMAIL PROTECTED]



<>

Duplicate Entries in Array

2003-01-07 Thread Stanley . G . Martin
And the winner is:

my @list = qw(item item2 item item2 item3 item3  item4 );
my %listed;
map{$listed{$_} = 1}@list;

@unique = keys %listed;

Thanks to Michael Higgins for this one.
Also, thanks for all the responses. It was interesting what I found when
I ran the others.  Always learn something new about Perl.

Stanley G. Martin
Sprint - EIS³ Customer Care
[EMAIL PROTECTED]



<>

RE: date compare in sql ???

2002-12-27 Thread Stanley . G . Martin
This will get records where the date is within 30 days of today:

WHERE TO_DAYS(NOW()) - TO_DAYS(DATE_FIELD) <= 30 

TO_DAYS is a function in MySql.  There are a number of these type
functions.

Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services 
[EMAIL PROTECTED]


-Original Message-
From: kris [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 4:55 PM
To: dbi-users
Cc: Perl-Win32-Users
Subject: date compare in sql ???


Hi folks, 

i hope you had an nice x-mas. Well, back in the office i have a lot
things to 
do, that's more "administrative" stuff.
I know i can compare dates in a mysql table, but i have problems to do a

comand that's compares a date (added by days) whith now().

e.g:
Select... ... WHERE (startdate + $days) < now()

so how i can add $days to the database field startdays and check it with

the now() time ? 

Thanx for any help
Kris
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Updating wins problem

2002-10-31 Thread Stanley . G . Martin
I've seen this problem when I include the line:

use Win32;

To get around it, whenever I use a function from Win32 I simply fully
qualify it.

Ex.   $machine = Win32::NodeName();

I can then remove the 'use Win32' line.

Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services 
[EMAIL PROTECTED]


-Original Message-
From: stevesilvers [mailto:stevesilvers@;hotmail.com]
Sent: Thursday, October 31, 2002 7:28 AM
To: perl-win32-users
Subject: Updating wins problem


The below Perl snippet keeps giving me prototype mismatch errors. The
script 
runs via command line to change the wins entries.

 ERRORS 

Prototype mismatch: sub main::NULL () vs none at (eval 1) line 5.
Constant subroutine NULL redefined at (eval 1) line 5.
Prototype mismatch: sub main::WIN31_CLASS () vs none at (eval 1) line 6.
Subroutine WIN31_CLASS redefined at (eval 1) line 6.
Prototype mismatch: sub main::OWNER_SECURITY_INFORMATION () vs none at
(eval 
1)
line 183.
Constant subroutine OWNER_SECURITY_INFORMATION redefined at (eval 1)
line 
183.
Prototype mismatch: sub main::GROUP_SECURITY_INFORMATION () vs none at
(eval 
1)
line 184.
Constant subroutine GROUP_SECURITY_INFORMATION redefined at (eval 1)
line 
184.
Prototype mismatch: sub main::DACL_SECURITY_INFORMATION () vs none at
(eval 
1) l
ine 185.
Constant subroutine DACL_SECURITY_INFORMATION redefined at (eval 1) line

185.
Prototype mismatch: sub main::SACL_SECURITY_INFORMATION () vs none at
(eval 
1) l
ine 186.
Constant subroutine SACL_SECURITY_INFORMATION redefined at (eval 1) line

186.

 END ERRORS 


Any suggestions greatly appreciated.
Steve

#!/Perl -w

# To update a local machine, enter.
# c:\>perl winser.pl  
#
# To update a remote machine, enter.
# c:\>perl winser.pl   remote

#
# To update multiple machines, enter.
# c:\>perl winser.pl   file 

use Win32;
use strict;
require 'NT.ph';

use vars qw(@machines $machine $key_LM $key_Adapters $i $adaptername 
$key_Adapter);

# The below looks for command line args, or it will print the sub help.

(@ARGV) or &PrintHelp;

# Let's grab the command line args in either $primary and/or $secondary.

my $primary = $ARGV[0];
my $secondary = $ARGV[1];

# Now Perl is looking for the 3rd argument, if entered, it is a remote
# machine.

if ($ARGV[2]) {
  if (lc($ARGV[2]) eq "remote") {
@machines = ($ARGV[3]);
  } elsif (lc($ARGV[2]) eq "file") {
open(FILELIST, "<$ARGV[3]") or
die "Unable to read file $ARGV[3] for list of ".
"computernames.\n";
@machines = grep(/\S/, map {s/\s//g; $_} );
close FILELIST;
  } else {
die "Third command line option $ARGV[2] illegal.\n";
  }
} else {
  @machines = ($ENV{COMPUTERNAME});
}

foreach $machine (@machines) {
  unless (Win32::RegConnectRegistry($machine,
  &HKEY_LOCAL_MACHINE, $key_LM)) {
print "$machine: ERROR, unable to connect to ".
"remote registry.\n";
next;
  }
  unless (Win32::RegOpenKeyEx($key_LM,
  "SYSTEM\\CurrentControlSet\\Services\\NetBT\\Adapters",
  &NULL, &KEY_ALL_ACCESS,  $key_Adapters)) {
print "$machine: ERROR, unable to connect to open ".
"NetBT\\Adapters.\n";
Win32::RegCloseKey($key_LM);
next;
  }
  $i = 0;
  while (Win32::RegEnumKey($key_Adapters, $i++,
  $adaptername)) {
($adaptername =~ /NdisWan/i) and next;
unless (Win32::RegOpenKeyEx($key_Adapters, $adaptername,
&NULL, &KEY_ALL_ACCESS,  $key_Adapter)) {
  print "$machine: ERROR, unable to connect to open ".
  "NetBT\\Adapters\\$adaptername.\n";
  next;
}
unless (Win32::RegSetValueEx($key_Adapter, "NameServer",
&NULL, ®_SZ, $primary)) {
  print "$machine: ERROR, unable to set primary WINS ".
  "address or $adaptername.\n";
  Win32::RegCloseKey($key_Adapter);
  next;
}
unless (Win32::RegSetValueEx($key_Adapter,
"NameServerBackup", &NULL, ®_SZ, $secondary)) {
  print "$machine: ERROR, unable to set secondary WINS ".
  "address for $adaptername.\n";
  Win32::RegCloseKey($key_Adapter);
  next;
}
print "$machine: Set primary and secondary WINS ".
"addresses to $primary and $secondary for ".
"adapter $adaptername.\n";
Win32::RegCloseKey($key_Adapters);
  }
  Win32::RegCloseKey($key_LM);
}

sub PrintHelp {
  print <http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Problem with Date::Manip

2002-10-25 Thread Stanley . G . Martin
I'm trying to determine the number of days, hours, minutes, seconds
since the last reboot of a server.  With WMI I can get the date and time
of when that occurred. When I use Date::Manip to calculate the
difference between the current date/time and the last reboot, it comes
up incorrect.  

Example:

use Date::Manip;

$date1 = "10/17/02 2:59 PM";
$date1a = &ParseDate($date1);
$date2 = &ParseDate("today");
$date3 = &DateCalc($date1a, $date2, \$err);

print "date1 => $date1a\n";
print "date2 => $date2\n";
print "date3 => $date3\n";

The output looks like this:

date1 => 2002101714:59:00
date2 => 2002102510:47:56
date3 => +0:0:1:0:19:48:56

There's defintely 7+ days between these two dates, it shows 0 days, 19
hours, 48 minutes, 56 seconds.

Is this a bug? Is my use of DateCalc incorrect? Or is there a
better/different way?

Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services 
[EMAIL PROTECTED]


<>

Perl Script as a Service

2002-09-23 Thread Stanley . G . Martin

I'm trying to get a script that wrote that listens on a port for
connections from a client.  The script runs fine from command line, but
when I set it up as a service, it won't start.  I took this right out of
Dave Roth's Win32::Daemon module.  When I use the Win 2000 Resource Kit
utility 'srvany', it works fine.

use Win32::Daemon; 

%Hash = (
name=>  'PerlTest',
display =>  'Oh my GOD, Perl is a service!',
path=>  'd:\perl\bin\perl.exe',
user=>  '',
pwd =>  '',
parameters =>'d:\perl\bin\script.pl',
);

if( Win32::Daemon::CreateService( \%Hash ) )
{
print "Successfully added.\n";
}
else
{
print "Failed to add service: " . GetError() . "\n";
}



print "finished.\n";

sub DumpError
{
print GetError(), "\n";
}

sub GetError
{
return( Win32::FormatMessage( Win32::Daemon::GetLastError() ) );
}

Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services 
[EMAIL PROTECTED]




WINMAIL.DAT
Description: application/ms-tnef


RE: Uptime of remote system??

2002-09-04 Thread Stanley . G . Martin

When you installed Date::Manip, a file called Manip with no extension
was created in (e.g. my location):
 
D:\Perl\Site\Lib\Date
 
In that file you should set your Timezone. Mine is CST6CDT.
 
In the file Manip.pm is a line:
 
    $Cnf{"GlobalCnf"}= "";
 
Change it to read:
 
    $Cnf{"GlobalCnf"} = "D:\\Perl\\Site\\Lib\\Date\\Manip.cnf";
 
This tells Manip.pm to use the file Manip to get it's global settings.
 
Your installation tree may differ.

Stanley G. Martin 
Sprint - ISS Enterprise App/Decision Support Services 
[EMAIL PROTECTED] 

   -Original Message-
   From: MKhan [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, September 04, 2002 3:32 PM
   To: Stanley.G.Martin; dbe; MKhan
   Cc: perl-win32-users
   Subject: RE: Uptime of remote system??
   
   

   I am getting the error as follows: 
   use Date::Manip; 

   Server uptime is 20020903073500.00-420ERROR: Date::Manip unable
   to determine TimeZone. 
       Date::Manip::Date_TimeZone called at
   D:/Perl/lib/Date/Manip.pm line 627 
       Date::Manip::Date_Init() called at D:/Perl/lib/Date/Manip.pm
   line 745 
       Date::Manip::ParseDateString(20020903073500) called at
   D:/Perl/lib/Date/Manip.pm line 1447 
       Date::Manip::DateCalc(20020903073500, '+ 300 minutes') called
   at uptime.pl line 42 

   -Original Message- 
   From: [EMAIL PROTECTED] 
   [ mailto:[EMAIL PROTECTED]] 
   Sent: Wednesday, September 04, 2002 5:14 AM 
   To: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
   Cc: [EMAIL PROTECTED] 
   Subject: RE: Uptime of remote system?? 


   I think it's the last reboot in GMT.  Anyway, I didn't want to spend
   too 
   much time on it so this is what I did: 

   use DateManip; 

   $os_lastboot = $svruptime->{'LastBootUpTime'}; 
   $os_lastboot = substr($os_lastboot, 0, index($os_lastboot, "."));  # 
   only want left of period 
   $os_lastboot = &DateCalc($os_lastboot, "+ 300 minutes");   # 
   time offset 
   $os_lastboot = &UnixDate($os_lastboot, "%Y-%m-%d %T"); # 
   convert to readable time 

   Stanley G. Martin 
   Sprint - ISS Enterprise App/Decision Support Services 
   913.315.4576 
   913.226.3090  PCS 
   [EMAIL PROTECTED] 


   -Original Message- 
   From: dbe [ mailto:[EMAIL PROTECTED]] 
   Sent: Tuesday, September 03, 2002 10:45 PM 
   To: MKhan 
   Cc: perl-win32-users 
   Subject: Re: Uptime of remote system?? 


   Khan, Moin wrote: 
   > Hi, 
   > I am trying to findout the uptime of the remote NT/2000 system
   through 

   > perl script, i am using wmi in perl script to get the counter, it 
   > working fine but the value is returning is difficult to understand,
   
   code 
   > is as follows: 
   > 
   > my 
   $Class="WinMgmts:{impersonationlevel=impersonate}!//$szServer"; 
   >   my $Wmi = Win32::OLE->GetObject ($Class) or next; 
   >   my @Svruptime = in ($Wmi->InstancesOf 
   ("Win32_OperatingSystem")); 
   >   
   > foreach my $svruptime (@Svruptime) 
   > { 
   > $output = $svruptime->{LastBootUpTime}; 
   > print "Server uptime is " . $output; 
   > } 
   > 
   > and the output is like that: 
   > Server uptime is 20020903073500.00-420 
   > 
   > Can anyone help me on this, I really appreciate it. 

   Looks like a date to me (adding a few spaces, /'s and :'s): 

     2002/09/03 07:35:00.00 

     Not sure what this is maybe timezone offset? -0700 ? : -420 


   -- 
      ,-/-  __  _  _ $Bill Luebkert   ICQ=162126130 
     (_/   /  )    // //   DBE Collectibles   Mailto:[EMAIL PROTECTED] 
      / ) /--<  o // //  http://dbecoll.tripod.com/ (Free site for 
   Perl) 
   -/-' /___/_<_http://www.todbe.com/ 

   ___ 
   Perl-Win32-Users mailing list 
   [EMAIL PROTECTED] 
   To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs 


   



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Uptime of remote system??

2002-09-04 Thread Stanley . G . Martin

I think it's the last reboot in GMT.  Anyway, I didn't want to spend too
much time on it so this is what I did:

use DateManip;

$os_lastboot = $svruptime->{'LastBootUpTime'};
$os_lastboot = substr($os_lastboot, 0, index($os_lastboot, "."));  #
only want left of period
$os_lastboot = &DateCalc($os_lastboot, "+ 300 minutes");   #
time offset
$os_lastboot = &UnixDate($os_lastboot, "%Y-%m-%d %T"); #
convert to readable time

Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services 
913.315.4576
913.226.3090  PCS
[EMAIL PROTECTED]


-Original Message-
From: dbe [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 10:45 PM
To: MKhan
Cc: perl-win32-users
Subject: Re: Uptime of remote system??


Khan, Moin wrote:
> Hi,
> I am trying to findout the uptime of the remote NT/2000 system through

> perl script, i am using wmi in perl script to get the counter, it 
> working fine but the value is returning is difficult to understand,
code 
> is as follows:
> 
> my
$Class="WinMgmts:{impersonationlevel=impersonate}!//$szServer";
>   my $Wmi = Win32::OLE->GetObject ($Class) or next;
>   my @Svruptime = in ($Wmi->InstancesOf
("Win32_OperatingSystem"));
>   
> foreach my $svruptime (@Svruptime)
> {
> $output = $svruptime->{LastBootUpTime};
> print "Server uptime is " . $output;
> }
> 
> and the output is like that:
> Server uptime is 20020903073500.00-420
> 
> Can anyone help me on this, I really appreciate it.

Looks like a date to me (adding a few spaces, /'s and :'s):

  2002/09/03 07:35:00.00

  Not sure what this is maybe timezone offset? -0700 ? : -420


-- 
   ,-/-  __  _  _ $Bill Luebkert   ICQ=162126130
  (_/   /  )// //   DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--<  o // //  http://dbecoll.tripod.com/ (Free site for
Perl)
-/-' /___/_<_http://www.todbe.com/

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



LWP and ASP Pages

2002-08-26 Thread Stanley . G . Martin

I'm trying to test to make sure my web site is up by connecting to the
admin web page of my application.  The admin web page is an ASP page and
whenever I set it up using:

use HTTP::Request;
use LWP::UserAgent;

$filename  = D:\\temp\\msi.html";

$ua = LWP::UserAgent->new;
$url = "http://webserver/admin.asp";;
$req = new HTTP::Request (GET => $url);
$res = $ua->request($req, $filename);
if ($res->is_success) {
print "Got response back from web page\n";
} else {
print "No response from web page.\n";
exit;
}

It always fails.  I can take the URL and plug it into a browser and it
comes up just fine.  Any ideas???


Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services 
[EMAIL PROTECTED]




WINMAIL.DAT
Description: application/ms-tnef


Perl Presentation

2002-08-21 Thread Stanley . G . Martin

I've been charged with putting together a "Brown Bag" session for a
group of application people on  what Perl is and what it does for me as
a System Administrator and what it might do for them.  Anyone know of a
place to get some good information to help put this together.  Most of
these people have either never heard of Perl or they've heard of it but
thought they'd get to know it later.

Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services 
[EMAIL PROTECTED]




WINMAIL.DAT
Description: application/ms-tnef


PPM Question

2002-06-24 Thread Stanley . G . Martin

I have somewhat of a stupid question concerning PPM and 5.xx vs. 6.xx
modules.

If the PPD is a pre Perl 6 module, how does it get installed on a Perl 6
system since:

  # Perl 5.xx

# Perl 6.xx

Wouldn't it just fall right on through the PPD since it doesn't find a
match?

Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services 
913.315.4576
913.226.3090  PCS
[EMAIL PROTECTED]




WINMAIL.DAT
Description: application/ms-tnef


RE: Task Scheduler

2002-05-23 Thread Stanley . G . Martin

I'm having a problem on SOME but NOT ALL of my Win2k boxes with the
Enum() method.  It's very consistent on these particular servers in that
it is successful on the SetTargetComputer method, but the array is empty
after execution of the Enum method.  Any thoughts on that?

Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services 
[EMAIL PROTECTED]


-Original Message-
From: Jason.Murray [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 23, 2002 8:24 AM
To: Perl-Win32-Users
Subject: Re: Task Scheduler


Got it.

#
# Read Schedules Tasks#
#


use strict;
use Win32::TaskScheduler;

Varibles###

my $scheduler;
my $count;
my @jobs;
my $jobName;
my $result;
my $AccountInformation;
my $ApplicationName;
my $Parameters;
my $WorkingDirectory;
my $Priority;
my $Creator;
my $HostName; # Name of the server this will run on.

##


$scheduler = Win32::TaskScheduler->New();

$scheduler->SetTargetComputer("MachineName");

#Enumerate the jobs on the selected server.
@jobs = $scheduler->Enum();

$count=0;

  while ($count < @jobs) {

  $jobName=$jobs[$count];
  $jobName=~(s/\.job//);
  print "Job Name: $jobName\n";

  #Sets the job on which the package will operate from now on. The
name
must be without the .job extension and result will be:
  $result = $scheduler->Activate($jobName);

  #Returns the username for the currently active job or undef in
case
of error.
  if (defined $scheduler-> GetAccountInformation()) {
$AccountInformation = $scheduler-> GetAccountInformation();
print "Account Information: $AccountInformation\n";
  }else{ print "The Account Information is not Defined\n";
  }



  #Gets the command that will be executed at the time specified for
this scheduled task.
  if (defined $scheduler-> GetApplicationName()) {
$ApplicationName = $scheduler-> GetApplicationName();
print "Application Name: $ApplicationName\n";
  }else{ print "The Application Name Information is not Defined\n";
  }


  # Gets the parameters passed to the command that will be executed
at
the time specified for this scheduled task.
  if (defined $scheduler-> GetApplicationName()) {
$Parameters = $scheduler->GetParameters();
print "Parameters: $Parameters\n";
  }else{ print "The Parameters Information is not Defined\n";
  }

  # Gets the working directory for this scheduled task.
  if (defined $scheduler-> GetWorkingDirectory()) {
  $Parameters = $scheduler->GetParameters();
print "Working Directory: $WorkingDirectory\n";
  }else{ print "The Working Directory Information is not Defined\n";
  }



  # Gets the priority associated with the currently selected task.
  #if (defined $scheduler-> GetPriority()) {
  # print "The Priority Information is Defined\n";
  # $Priority = $scheduler-> GetPriority($jobName);
  # print "Priority: $Priority\n";
  #}else{ print "The Priority Information is Not Defined\n";
  # }


  #Returns the creator of the currently selected task. Returns undef
on
error.
  if (defined $scheduler-> GetCreator()) {
$Creator = $scheduler->GetCreator();
print "Creator: $Creator\n";
  }else{ print "The Creator Information is Not Defined\n";
  }
  print "\n\n";

  $count++;
  }


Thanks,

Jason Murray
IBM Global Services, Server Platforms Team, Intel division
Why live in the Thick of Thin things.

Ph: 416.926.3000 Ext 5758  Fax: 416.926.5234
Cell:416.459.6925 Pager:416.329.1443
mailto: [EMAIL PROTECTED]
mailto: [EMAIL PROTECTED]




  <[EMAIL PROTECTED]>   

  Sent by:To:   
[EMAIL PROTECTED]
  [EMAIL PROTECTED]cc:   

  veState.com
Subject:  Task Scheduler





  05/22/2002 11:54 PM   









Hey all,

  New to the perl idea. I put this script together to list all the
scheduled tasks on a machine. Works fine locally. I try to use 

Adding Users to Groups

2002-02-20 Thread Stanley . G . Martin

I've been fighting this all day.  I need to migrate about 30 local
groups and about 500 domain users from an NT 4.0 box to a Win2000 box.
I've been able to create the groups using Win32::Lanman, but haven't
been able to add users to those groups with either Win32::Lanman or
Win32::NetAdmin.  I'm logged on as administrator with Perl 5.6 Build 631
on the box.  Any suggestions???



WINMAIL.DAT
Description: application/ms-tnef


RE: Drop Down list

2001-06-20 Thread stanley . g . martin

If you've done all the up front work with DBI and done your query, you just need to 
get the results into your list like this:

while ($row = $sth->fetchrow_array) {
print "fetchrow_array()) {
$value1 = $data[0];
$value2 = $data[1];
}

What would be the best way to create something like:

$value2
 

but, do it for every record in the table so you could navigate to each and every one. 
I know foreach figures into this. If I could only get this down I'd be well on my way 
to being a happy, well adjusted Perl programmer!

Humbled,
Mark Bergeron
/~_. _ | _ _  _  _ 
\_/|(_||| | |(_)| |
 _|
___
GO.com Mail
Get Your Free, Private E-mail at http://mail.go.com


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Getting description from Eventlog

2001-03-14 Thread stanley . g . martin

I have some Events in my Eventlog that are Informational entries but
don't print out the description.

Example:

Source => OtMan4
Length => 64
EventType => 4
Message =>
ClosingRecordNumber => 0
RecordNumber => 3231
Strings => *
Data => **f***s`*X***h***
***
Timewritten => 984545180
TimeGenerated => 984545180
Category => 0
User =>
EventID => 1610612740
Computer => KXFDE01

In this example there's no message and the strings only has a '*'.  If I
went right to the Eventlog on the system the description would read:

OTM closed.


Where is this information and why can't I get to it?

Stanley G. Martin
Midwest Consulting Group
Sprint Platform & Strategy Mgmt
913.315.3133
[EMAIL PROTECTED]




RE: DBI:Oracle tnsnames.ora

2001-02-13 Thread stanley . g . martin

I believe that one of the problems with using Oracle on NT is that the ORA_HOME is in 
the registry.  Whereas in UNIX you can set it in the Perl script with:

# Location of the tnsnames.ora file you want to use
$ENV{'TNS_ADMIN'} = "/home/oracle/admin/sqlnet/tnsname.dir";

# ORACLE_HOME
$ENV{'ORACLE_HOME'} = "/home/oracle/product/8.0.5";




Stanley G. Martin
Midwest Consulting Group
Sprint Platform & Strategy Mgmt
913.315.3133
[EMAIL PROTECTED]

 -Original Message-
From:   jschell [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, February 12, 2001 3:17 PM
To: Robert.Jones2
Cc: jschell; activeperl; perl-win32-users
Subject:Re: DBI:Oracle tnsnames.ora

Jones Robert Contr 81 CS/SCK wrote:
> 
> OS: Windows 2000 & NT
> Perl 5.005 activestate build 522
> DBI [1.13.1] Database independent interface for Perl
> 
> On our systems we run Oracle 7.0, 8.0 and 8.1 servers.  Each of these has
> it's own tnsnames.ora file for hostnames that the Oracle driver queries.
> 
> 1) Which tnsnames.ora will Oracle default to using DBI:Oracle ?
> 
> 2) How can you change the tnsnames.ora file being referenced by DBI:Oracle ?
> 

I would guess that 8.1 will access 8.0 and 7.0, so I would probably set
it up that way.

If that doesn't work, I would guess that setting the PATH env var
correctly, before running each script, would do the trick.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: (no subject)

2001-02-12 Thread stanley . g . martin

Here's a small sub that I used to use to access a Cisco Local Director to check the 
status of the nodes connected to it.

  
# Config Variables
my $host= 'cisco';
my $command = 'show real';
my $pass= 'password';
my $t   = new Net::Telnet;

$t->open($host);
$t->waitfor('/password:.*$/');
$t->print($pass);
$t->waitfor('/ciscoprompt>.*$/');
$t->print("enable");
$t->waitfor('/Password:.*$/');
$t->print("nscrw");
$t->waitfor('/ciscoprompt.*$/');

# execute the command
my @output = $t->cmd($command);

    # dump the output
open (TELNET, "> C:\\telnet.txt");
print TELNET @output;
close(TELNET);

Stanley G. Martin
Midwest Consulting Group
Sprint Platform & Strategy Mgmt
913.315.3133
[EMAIL PROTECTED]

 -Original Message-
From:   kevin.foster [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, February 12, 2001 7:26 AM
To: Perl-Win32-Users
Subject:(no subject)

Has anyone used Net::Telnet to connect to a Cisco Switch?

Thanks,

Kevin Foster
Systems Administrator
Engineering Services - Vignette Corp.
Desk: (512) 741-1356
Cell: (512) 970-6748

"Building a better idiot through automation"
 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Need a Module

2000-11-06 Thread stanley . g . martin

I cannot get to David Roth's site through PPM. Could someone send me the
module Win32::Eventlog::Message?


Stanley G. Martin
Midwest Consulting Group
Sprint Finance Reengineering
913.315.3133
[EMAIL PROTECTED]