Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 669
  • Last Modified:

vbscript and IIS

I am writing a program to query IIS servers for information such as security attributes, Site name, etc.  When I started doing test runs of the program, I began to realize that I couldn't run it on my workstation because IIS was not installed on my system.  Is there a way to get around installing IIS to make my program work?  If I have to install this product, is there some smaller subset that I could get away with (group of DLL's and some executables?) to get this functionality?  Thanks for any assistance.
0
tkw829
Asked:
tkw829
  • 4
  • 3
  • 3
  • +1
1 Solution
 
AzraSoundCommented:
Is IIS running on a machine anywhere on your network?  If so, could you point your scripts to those machines for testing?  The scaled down version of IIS is PWS (Personal Web Server).  Never installed it myself...probably available somewhere on Microsoft's website.
0
 
AlexFMCommented:
What is your operating system? It is easy to install IIS on Windows NT/2K/XP computer: Control Panel - Add/Remove programs - Add/Remove Windows components. In NT you need Option Pack 4 for this.
0
 
AlexFMCommented:
Having IIS you can talk with him using localhost name.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
fozyletCommented:
PWS comes with the Visual Studio 6 cd set... but your calls to IIS may not work with PWS.
If you have NT/2K/XP, it is best to add IIS, as AlexFM said.
0
 
tkw829Author Commented:
My ideal scenario would be to not have to install IIS at all.  Do I have to have it in order to query IIS servers?  Thanks for your patience.  

P.S. - I am running the query from a windows NT workstation with WSH 5.6.  What is PWS?

Additional background - If I can successfully create this program, I will be wrapping it up in an installer to be distributed to co-workers for general use.  This is why I would like to avoid having to include IIS in the install.  Again thanks for your patience.
0
 
fozyletCommented:
PWS is a scaled down web server from MS which can take only 10 max connections at a time (i.e. basically for testing purposes).

If you have an IIS server to which you have access in your network, you should be able to query it.
if only general things like site name is being queried, you might be able to do the query on any IIS server in the internet too.

do a http://www.whois.sc/mydomain.com on a domain and see the 'server type' that comes up, to see if it is IIS.
0
 
AzraSoundCommented:
>> I am running the query from a windows NT workstation with WSH 5.6

As long as WSH is installed, and that's where all of the code is coming from, that should be all you need to execute it.  If IIS isn't installed on the server being queried, your code just doesn't return anything, but it shouldn't be dependent on the machine running the code to have IIS installed, one wouldn't think.
0
 
tkw829Author Commented:
Maybe it's just my code then.  This first piece of code gives me the following (hostname is a placeholder for the real name in my script)

error:
ActiveX component can't create object IIS://hostname

Code:
Set IIsWebServerObj = CreateObject("IIS://'hostname'")

This second piece of code gives me invalid syntax

Error:
Line 1
Invalid syntax code: 800401e4 source: (null)

Code:
set vdirObj=GetObject("IIS://'hostname'/W3svc/1/Root")
' Print out the current value of some properties:
For Each Property in vdirObj.Properties
 WScript.Echo Property.Name & " = " & Property.Value
Next

P.S. - These scripts were directed at a legitimate IIS 5.0 server (Windows 2000).  If I run these scripts locally on that same server, they run just fine.
0
 
tkw829Author Commented:
As a reference, I know that queries to a Microsoft SQL database apparently require you to have some form of SQL client installed on the machine running the script.  I've also experienced not being able to directly access winsock unless I had a developers license, but someone found away around that by making certain system calls to bypass the license issue.  If no one can find a way around installing IIS, then I probably should give the points to AzraSound as the first respondent with essentially the same idea being expressed throughout the replies.  Thanks again all of you.
0
 
fozyletCommented:
It seems you are using IIS Admin Objects in the script.
In that case you will need those installed in each machine trying to run that vbs.
AM not sure if you will get these components separately.

Please see http://www.microsoft.com/windows2000/en/server/iis/htm/asp/aogu2wab.htm for details
0
 
AzraSoundCommented:
>>queries to a Microsoft SQL database apparently require you to have some form of SQL client

It requires that you have MDAC installed, which contains the drivers and components necessary for talking to Microsoft data stores.

I still wouldn't think you needed anything installed to execute the code above other than the latest scripting runtimes, and proper security rights to access the remote IIS metabase.  Perhaps its simply a security issue, though, I never had to do anything like this so never dug around to see what security settings may need to be tweaked to allow you proper remote access.
0
 
tkw829Author Commented:
It looks like the IIS resource kit is the bare minimum that will give some access to IIS.  Thanks everyone.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now