• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 387
  • Last Modified:

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.
0
easycgi
Asked:
easycgi
  • 2
1 Solution
 
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
 
moduloCommented:
PAQed with points refunded (500)

modulo
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now