On Tue, 25 Mar 2003 12:39:20 -0800, "Raymond Forbes" <[EMAIL PROTECTED]> wrote:
>of course if anybody has any sample code that would be greatly >appreciated ;-) > >but in the mean time i am trying to figure it out from a vbscript that i >have. > >this does not work.... > >use Win32; >use Win32::OLE; > >$websvc = Win32::OLE -> GetObject("IIS://localhost/W3SVC"); > >$site = $websvc -> GetObject("IISWebServer", "Default Web Site"); > > >now, according to the vbscript, this is somewhat how you do it but i >keep getting > >Win32::OLE(0.1601) error 0x80070003: "The system cannot find the path >specified" > >so i must be close. > >anybody have any ideas? #---------------------------------------------------------------------- use strict; use warnings; use Win32::OLE qw(with); my($Name,$Path) = @ARGV; my $ADsPath = "IIS://localhost/W3SVC/1/ROOT"; my $website = Win32::OLE->GetObject($ADsPath) or die; Win32::OLE->Option(Warn => 0); $website->Delete('IISWebVirtualDir', $Name); exit unless defined $Path; my $virdir = $website->Create('IISWebVirtualDir', $Name) or die; with($virdir, Path => $Path, AppFriendlyName => $Name, EnableDirBrowsing => 1, AccessRead => 1, AccessWrite => 0, AccessExecute => 1, AccessScript => 0, AccessNoRemoteRead => 0, AccessNoRemoteScript => 0, AccessNoRemoteWrite => 0, AccessNoRemoteExecute => 0, ); $virdir->AppCreate(1); $virdir->SetInfo(); #---------------------------------------------------------------------- Cheers, -Jan _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs