here is the test script I am running:
-----------------------START---------------------------------
#c:\ole.pl test script for IIS admin
use strict;
use Win32::OLE;
use Win32;
my $ServObj =
Win32::OLE::GetObject("IIS://UKWATSRV10/w3svc/1/Root",sub{$_[0]->Quit;})
or die "Could not GetObject\nOLE ERR="
. Win32::OLE::LastError() . "\nWin32 ERR="
. Win32::FormatMessage(Win32::GetLastError());
-----------------------END-------------------------------------
The output is :
C:\>ole.pl
Could not GetObject
OLE ERR=
Win32 ERR=The system cannot find the file specified.
I have tried running the same script from a remote workstation and the IIS
Server itself,
exactly the same result. It seems to me that the IIS: part of the path is
something that VBS knows about
but perl is ignorant of, hence the Win32 Error.
Regards
Steve
-----Original Message-----
From: Tillman, James [mailto:[EMAIL PROTECTED]]
Sent: 29 January 2002 16:28
To: 'Price, Steve A'; [EMAIL PROTECTED]
Subject: RE: Win32::OLE question
> How do you translate
> vbs Set ServObj = GetObject("IIS://MYWEBSERVER/w3svc/1/Root")
> into perl Win32::OLE
>
use Win32::OLE;
my $ServObj = Win32::OLE::GetObject("IIS://MYWEBSERVER/w3svc/1/Root");
Once you get the hang of it, it's quite automatic. I almost had a
conversion perl script once, but I couldn't get it to work in enough cases
where the human eye did the job so much better.
Properties are accessed like this:
$ServObj->{Path} = "c:\inetpub\apps\MyApp";
Methods like this:
$ServObj->CreateObject("IisWebVirtualDir", "MyApp");
jpt
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe:
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Email Disclaimer
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter.
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users