Win32::OLE with IIS AppGetStatus()

I'm trying to use Win32::OLE with IIS 5.0. The AppGetStatus() method is not returning any values when run on an IIsWebDirectory. I've tried this both with and without an application installed on the directory. Code example follows:

use Win32;
use Win32::OLE;

$obj  = Win32::OLE->GetObject("IIS://LocalHost/W3SVC/9/ROOT/foo")
      or die "Can't access IIS on the local machine\n";

print $obj->AppGetStatus();

The IIS 5.0 documentation refers to three constants (APPSTATUS_NOTDEFINED, APPSTATUS_RUNNING, and APPSTATUS_STOPPED) that can be returned, but no values are returned at all, so I can't check on any equality.
easycgiAsked:
Who is Participating?
 
moduloConnect With a Mentor Commented:
PAQed with points refunded (500)

modulo
Community Support Moderator
0
 
sstoukCommented:
The first thing I would try is to change the user ID, under which the IIS virtual directory, executing this script is running to a Local Administrator - just to check if this is a permission issue and the IIS Anonymous user might have no access to the Object Path.
0
 
easycgiAuthor Commented:
The test was ran from the command line while logged in as a Domain Admin.  We can get other objects like the application name just fine.  It is just the GetAppStatus() we are having the problem with.
0
 
easycgiAuthor Commented:
So we gave up on using GetAppStatus(), instead we are just checking to see if the FriendlyName exists which accomplishes the same task.  Thanks for your help.
0
All Courses

From novice to tech pro — start learning today.