473,320 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Vbscript in ASP

Hi, I am extremely new to this ASP thing </apology>

I would like to use many of the server control scripts that I have taken
from the script centre on ASP pages. Whenever I try to use a script I always
get an error at the GetObject line, E.g.

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonat e}!\\"
& strComputer & "\root\cimv2")

The error is usually along the lines of

error '80041003'
/ADScripts/test.asp, line 14

Is it possible to host these scripts on IIS5 or do I have to find some other
way?

For background: I would like to enter the IP address of a server and get the
list of installed services and their status.

Regards, Don.
Jul 19 '05 #1
3 8187
You can't use WMI in an ASP page that allows anonymous access. You have to
set up Windows Authentication (or, against most sane suggestions, give IUSR
admin rights or change the identity of the app/site to be an admin).

"MonkFish" <nohope> wrote in message
news:#w**************@TK2MSFTNGP09.phx.gbl...
Hi, I am extremely new to this ASP thing </apology>

I would like to use many of the server control scripts that I have taken
from the script centre on ASP pages. Whenever I try to use a script I always get an error at the GetObject line, E.g.

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonat e}!\\" & strComputer & "\root\cimv2")

The error is usually along the lines of

error '80041003'
/ADScripts/test.asp, line 14

Is it possible to host these scripts on IIS5 or do I have to find some other way?

For background: I would like to enter the IP address of a server and get the list of installed services and their status.

Regards, Don.

Jul 19 '05 #2
Thanks Aaron, this put me on the right track and I got a few scripts up and
running! However, I am still getting a lot of very descriptive errors such
as:

"error '80041003'"

Can you point me to a site where I can learn the lot? -- from configuring
the server (my server is locked down and I'm not sure if I need to enable
any features) to writing the scripts in such a way that they work ;o)

BTW the error is spawned by the line:

Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=Impersonate}!\\" & strComputer & "\root\cimv2")

Thanks again.

Regards, Don.
"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:ON*************@TK2MSFTNGP10.phx.gbl...
You can't use WMI in an ASP page that allows anonymous access. You have to set up Windows Authentication (or, against most sane suggestions, give IUSR admin rights or change the identity of the app/site to be an admin).

"MonkFish" <nohope> wrote in message
news:#w**************@TK2MSFTNGP09.phx.gbl...
Hi, I am extremely new to this ASP thing </apology>

I would like to use many of the server control scripts that I have taken
from the script centre on ASP pages. Whenever I try to use a script I

always
get an error at the GetObject line, E.g.

Set objWMIService =

GetObject("winmgmts:{impersonationLevel=impersonat e}!\\"
& strComputer & "\root\cimv2")

The error is usually along the lines of

error '80041003'
/ADScripts/test.asp, line 14

Is it possible to host these scripts on IIS5 or do I have to find some

other
way?

For background: I would like to enter the IP address of a server and get

the
list of installed services and their status.

Regards, Don.


Jul 19 '05 #3
> "error '80041003'"

Sounds like you are *still* running an ASP page that is executing as the
anonymous user, or an authenticated user equivalent to a peon... you need to
have elevated privileges to run this script. See
http://www.perfhound.com/installation.asp for details on two alternative
ways to set this up. Also, if your WMI script is trying to obtain
information from other machines in the network, the namespace must be remote
enabled.
Can you point me to a site where I can learn the lot?


The WMI error codes are not documented very well (I had to troubleshoot
pretty much singlehandedly while writing some of the portions of PerfHound).
The most help I had was from the Lavy/Meggitt book "WMI" from New Riders.

If you want more specific help, you will probably be better off in a
WMI-specific group rather than ASP.

A
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Davis | last post by:
When I create new documents in Dreamweaver, there are several choices for ASP creation: ASP JavaScript: run at client side?? ASP VBScript: run at server side?? ASP.NET C# ASP.NET VB I don't...
29
by: Christopher Brandsdal | last post by:
If I have a .ASP page that runs JScript code - is it possible to include an ..ASP page that runs VBscript???
20
by: Harag | last post by:
Hi All. I'm stating out doing some web developing. I was wondering which of the server side languages should I concentrate on and learn. I Know CSS, HTML, T-SQL I can look at the client...
16
by: Mike Schinkel | last post by:
Does anyone know if there are bugs in VBScript's GetRef()? I'm using VBScript Version 5.6.8515 on Win2003Server w/ASP. Sometimes it returns an object that VarType() says is a vbObject. Other...
5
by: gpence | last post by:
!!! Newbie question warning !!! I am somewhat familiar with javascript's ability to "access" the browser's favorites list -- for example, using window.home() will take you to the default URL --...
4
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck...
2
by: Frank | last post by:
Can I do this? I add a session var in C# and ultimatly want to pass it into a vbscript client side activeX control. This is what I have so far but get " Object Required:'name2' " error. Can...
7
by: skeddy | last post by:
In a nutshell, I'm trying to dynamically create a select box with ResultSet code in vbscript and then need to be able to access the value of that select box later with a Save button. I've got...
10
by: Shadow Lynx | last post by:
That subject packs a whallop, so let me explain in better detail what's happening and how it relates to ASPX pages... In a nutshell, if the first <script /on a page is of type "text/vbscript",...
6
by: rishabhshrivastava | last post by:
Hello All, I am using ASP.NET 2.0 and I am experiencing a problem using vbscript that is this script on client side is preventing the postback of my controls. I have a dropdownlist which is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.