Re: Passing parameters

2005-05-26 Thread $Bill Luebkert
Jim Hansen wrote:

> I have two small .pl programs I've written.  One calls
> the other with Win32::Process.  The child program is
> just a splash screen.  When the parent is done with
> its thing, I kill the child process.  Works ok.   What
> I would like to do is create a status bar on the
> splash.  I have that done, but need to figure out how
> to pass information to the child process.  Has anyone
> done this before?  How would the child program listen
> for the parameters?

There are many ways to do this - sockets, a disk file,
shared memory, pipes, etc.  You could use IPC::Open2/3
instead of Win32::Process and then you would be able to
read/write to the child on the associated FHs.

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Passing parameters

2005-05-26 Thread Jim Hansen
I have two small .pl programs I've written.  One calls
the other with Win32::Process.  The child program is
just a splash screen.  When the parent is done with
its thing, I kill the child process.  Works ok.   What
I would like to do is create a status bar on the
splash.  I have that done, but need to figure out how
to pass information to the child process.  Has anyone
done this before?  How would the child program listen
for the parameters?

Thanks.

MG



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Why do equals signs (=) show up all over my reports

2005-05-26 Thread Chris Wagner
You can find out if it's goofy characters or plain ='s by filtering the
script output through od.  That will show the codes for all the characters
it gets raw. eg:

C:\WINDOWS\Desktop>echo abc | od -t x1
000 61 62 63 20 0d 0a
006

That's the hex codes for a, b, c, space, CR, LF.  Try viewing the output on
the command line with more and less.  Less will highlight non text characters.

At 05:29 PM 5/26/05 -0700, Forrest Payne wrote:
>I create a lot of reports with Perl formats.  When view them with notepad,
wordpad or word I see equals signs scatterd throughout the report.  Below is
an example.  This not text my program is creating.  When I send this report
directly to the printer the "equals" signs are not printed.  It appears that
some weird characters are showing when I view it online that the printer
ignores.






--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede males"

0100

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Help with Win32::API?

2005-05-26 Thread Sisyphus

- Original Message - 
From: "Matt Clark" <[EMAIL PROTECTED]>
To: 
Sent: Friday, May 27, 2005 7:14 AM
Subject: Re: Help with Win32::API?


> First hurdle cleared... someone pointed out to me that function names need
to be case-sensitive, so DsBrowseForContainerW should work... but now I'm
getting a separate error after calling Win32::API->Import on that
function... $^E is coming up as "Class already exists".  Help?
>

In your original script you read $!, irrespective of whether the Import()
succeeded or not. You really should read the error variables only if the
Import() fails (and you should, in that eventuality, also kill the script
there and then):

if(!Win32::API->Import('dsuiext', 'int DsBrowseForContainerW(LPDSBROWSEINFOW
pInfo)'))
{die $^E . "\n";}

For me, once I corrected the function name, the Import() worked fine. It was
a little misleading to say that the script then "ran without error" - I
should have said "ran without reporting any errors". For me, the call to
DsBrowseForContainerW() returns -1, indicating (according to the msdn
documentation) that the function call failed. That's about all that
happens - the script then exits normally.

I note also that the prototype for DsBrowseForContainer() lists pInfo as
being of type PDSBROWSEINFO, but Win32::API requires that it be written as
LPDSBROWSEINFO. I don't know if that discrepancy (which also carries over to
the wide version of the function) causes a problem. I suspect not  but I
don't know for sure.

Cheers,
Rob

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Why do equals signs (=) show up all over my reports

2005-05-26 Thread $Bill Luebkert
Forrest Payne wrote:

> I create a lot of reports with Perl formats.  When view them with
> notepad, wordpad or word I see equals signs scatterd throughout the
> report.  Below is an example.  This not text my program is creating. 
> When I send this report directly to the printer the "equals" signs are
> not printed.  It appears that some weird characters are showing when
> I view it online that the printer ignores.
> Has anyone run into this?  

No.  I never use formatted writes.

>Do you know how to stop it?

Quit doing whatever you're doing wrong.

Seriously, either quit using formatted writes and switch to (s)printf
or create a minuscule test case that fails and post the failing script
in it's entirety.  Is there any email involved with the data ?  Quoted
printable format can introduce ='s if not properly removed on the other
end.

Make sure you start it with
use strict;
use warnings;

> See the

We could have read this properly if you had posted in plain text (fixed
width fonts) rather than HTML.  Then it would line up like it's supposed
to :

> 41A10045 =  49152 19060 19023 51200  30720
> 42A114675 15068  3215 51200  46080
> 42A1000113107  3328  3279 51200  46080
> 42A1000614675 15043  3110 51200  46080
> 42A10007 5120 15040  3213 51200  46080
> 42A10009   168832 45320 44660 51200   5120
> =*
> ***T S M   C D L  C O M P A R E   R E P O R T  Page: 2 ***
> ******
> *** Program: CDLTapetoTSMCompare Date: 05/26/2005   Time: 18:50:14 ***
> **
> 42A10015   130517 49832 33054 51200  15360
> 42A1002514675 15052  3216 51200  46080
> 42A1002740448  9240  8849 51200  40960
> 42A1002853248 11210 10844 51200  35840 


-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: network inventory

2005-05-26 Thread Frank Pikelner
MACs will provide manufacturers (look for OUI tables using Google), though
they will not provide model information. Keep in mind network devices exist
at later 2 that are not manageable and may not have a MAC address.

If you can identify from say a switch and you see multiple MAC addresses on
a particular port it may indicate that there is another switch including a
non manageable hub on that port.

I suggest reading up on SNMP as another post suggested, MIB2, and how to
determine the private (if any OID trees exist).

Cheers,

Frank Pikelner


On 5/26/05 1:38 PM, "Chris" <[EMAIL PROTECTED]> wrote:

>> Is there anything out there that would allow to
>> identify a network device as a (router, switch,
>> firewall etc)?
> 
> 
> If you can obtain the device's MAC address, you should be able to determine
> it's manufacturer and possibly model.
> 
> ___
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Help with Win32::API?

2005-05-26 Thread Sisyphus

- Original Message - 
From: "Matt Clark" <[EMAIL PROTECTED]>

>
> Using $^E, the error I get is "The specified procedure could not be
found"... I get that no matter which way I try to load the function
(Win32::API->Import, Win32::API->new, new Win32::API, etc).  Any other
thoughts?
>

Yep - that's the error I got. It's just another way of saying that there
aint no such function. Acording to my Visual Studio documentation the second
letter of the function's name is a lower case 's' ('DsBrowse...'), not an
upper case 'S' ('DSBrowse...'), and when I change the function name
accordingly, I can then import the function and the script you posted runs
witrhout error.

Cheers,
Rob

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Why do equals signs (=) show up all over my reports

2005-05-26 Thread Forrest Payne
I create a lot of reports with Perl formats.  When view them with notepad, wordpad or word I see equals signs scatterd throughout the report.  Below is an example.  This not text my program is creating.  When I send this report directly to the printer the "equals" signs are not printed.  It appears that some weird characters are showing when I view it online that the printer ignores.
Has anyone run into this?  Do you know how to stop it?
 
See the 
 
41A10045 =  49152 19060 19023 51200  3072042A1    14675 15068  3215 51200  4608042A10001    13107  3328  3279 51200  4608042A10006    14675 15043  3110 51200  4608042A10007 5120 15040  3213 51200 
 4608042A10009   168832 45320 44660 51200   5120=    T S M   C D L  C O M P A R E   R E P O R T  Page: 2 **    ** Program: CDLTapetoTSMCompare Date: 05/26/2005   Time: 18:50:14
 *42A10015   130517 49832 33054 51200  1536042A10025    14675 15052  3216 51200  4608042A10027    40448  9240  8849 51200  4096042A10028    53248 11210 10844 51200  35840  __Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com ___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Help with Win32::API?

2005-05-26 Thread Matt Clark
First hurdle cleared... someone pointed out to me that function names need to 
be case-sensitive, so DsBrowseForContainerW should work... but now I'm getting 
a separate error after calling Win32::API->Import on that function... $^E is 
coming up as "Class already exists".  Help?

Matt Clark
Unit Head, Desktop Services
IT Department
UCSD Libraries

>>> "Matt Clark" <[EMAIL PROTECTED]> 05/26/05 09:44AM >>>
I've opened up dsuiext.dll with the DLL Export Viewer and verified that it's 
DSBrowseForContainerW (or A for ansi but I want unicode).

Using $^E, the error I get is "The specified procedure could not be found"... I 
get that no matter which way I try to load the function (Win32::API->Import, 
Win32::API->new, new Win32::API, etc).  Any other thoughts?

Matt Clark
Unit Head, Desktop Services
IT Department
UCSD Libraries

>>> "Sisyphus" <[EMAIL PROTECTED]> 05/25/05 09:35PM >>>

- Original Message - 
From: "Sisyphus" <[EMAIL PROTECTED]>
>
> The function is called DsBrowseForContainer() - not as you have written
it.
> (It matters :-)
>

I meant DsBrowseForContainerW() - not as *I* have written it. (It possibly
also matters :-)

Cheers,
Rob



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com 
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: network inventory

2005-05-26 Thread Chris
> Is there anything out there that would allow to
> identify a network device as a (router, switch,
> firewall etc)?


If you can obtain the device's MAC address, you should be able to determine
it's manufacturer and possibly model.

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: network inventory

2005-05-26 Thread Peter Eisengrein

> Is there anything out there that would allow to
> identify a network device as a (router, switch,
> firewall etc)?
> 

You can use snmp for this, but it is up to each manufacturer how (and where)
they define it in the MIB. If it allows snmp put, you could change it,
though (again, up to the manufacturer how they implement snmp, or if they
even use it at all).

Or, if you really want to be ambitious, you can get the MAC addresses and
map them back to the manufacturer (I believe the first 3 octets are the
manufacturer and the manufacturer gets to define the last 3 octets.)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Help with Win32::API?

2005-05-26 Thread Matt Clark
I've opened up dsuiext.dll with the DLL Export Viewer and verified that it's 
DSBrowseForContainerW (or A for ansi but I want unicode).

Using $^E, the error I get is "The specified procedure could not be found"... I 
get that no matter which way I try to load the function (Win32::API->Import, 
Win32::API->new, new Win32::API, etc).  Any other thoughts?

Matt Clark
Unit Head, Desktop Services
IT Department
UCSD Libraries

>>> "Sisyphus" <[EMAIL PROTECTED]> 05/25/05 09:35PM >>>

- Original Message - 
From: "Sisyphus" <[EMAIL PROTECTED]>
>
> The function is called DsBrowseForContainer() - not as you have written
it.
> (It matters :-)
>

I meant DsBrowseForContainerW() - not as *I* have written it. (It possibly
also matters :-)

Cheers,
Rob



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: network inventory

2005-05-26 Thread Chris Wagner
Use nmap.

At 08:59 AM 5/26/05 -0700, Tfbsr Bertrand wrote:
>Is there anything out there that would allow to
>identify a network device as a (router, switch,
>firewall etc)?





--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede males"

0100

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl as CGI writting to shares

2005-05-26 Thread Chris Wagner
You can also use the Win32::AdminMisc module's LogonAsUser to authenticate
for the share.

  LogonAsUser()
"LogonAsUser($Domain, $User, $Password)"
Logs the running process on as $User in $Domain. This requires that the
user account the script runs under have the ""act as part of the
operating system"" privilege.










--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede males"

0100

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


network inventory

2005-05-26 Thread Tfbsr Bertrand
Is there anything out there that would allow to
identify a network device as a (router, switch,
firewall etc)?

Thanks

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl as CGI writting to shares

2005-05-26 Thread Ken Cornetet
Or have your script do an explicit logon to the target server:

if( ! Win32::Lanman::NetUseAdd( {
remote => "$target\\ipc\$",
username => "UsernameGoesHere",
password => "YourPassword",
domain => "",
asg_type => &USE_IPC
}) ) {
die "logon failed $^E";
} 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Steven Manross
Sent: Wednesday, May 25, 2005 9:48 PM
To: Roderick A. Anderson; Perl-Win32-Users@listserv.ActiveState.com
Subject: RE: Perl as CGI writting to shares

You're likely running into issues with NTLM authentication on the other
box..

You'll have to check what user account IIS is running as (for anonymous
access) to the web server.

If it's a local account, You'll need to either:

--Create an account on the box you are mapping that exactly matches the
user id and password on the IIS box that is used for anonymous access
(not advised if you are trying to map to a share on a DC), or...

--Change IIS Anonymous account to a Domain account and give access to
that user account on the share you are trying to map.

Steven
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Roderick A. Anderson
Sent: Wednesday, May 25, 2005 6:42 PM
To: Perl-Win32-Users@listserv.activestate.com
Subject: Perl as CGI writting to shares


I realize this is not strickly the correct place to ask but I'm hoping 
for some direction.  My Google searches have not been useful.

I have a script that is called as a CGI ( index.pl ) that needs to write

some configuration data to a ( mapped/mounted ) share on another 
system.  To date I've had no success doing this.  I've had to resort to 
writing to a directory ( folder ) on the local machine and then 
map/mount that on the other system.

The writing to a mounted Windows share from a Linux box works fine.  I 
know how to allow that kind access from UNIX/Linux but Windows to 
Windows is stumping me.

I suspect it has to do with which id/account IIS is running the scripts 
as but the "Windows Experts" haven't been able to offered successful
help.

Anyone do this type of hybrid scripting?  IIS runs script that needs to 
write to a ( mapped ) share on another system.


TIA, ( and sorry for the off topic post )
Rod
-- 

---
[This E-mail scanned for viruses by Declude Virus]

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs