I'm new to IIS, so apologies if this is a silly question due to my lack of
knowledge. I have encountered the following issue on 2 of the 3 webservers
I'm working with. The problem is that the servers are unable to serve the
default localstart.asp page that is installed with IIS. I've traced the
problem down to the following ASP code:

Dim WshShell, ver
Set WshShell = Server.CreateObject("Wscript.Shell")
On Error Resume Next
ver = 0
ver = WshShell.RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows
NT\Printers\DisableWebPrinting")


The exact problem is with the CreateObject statement, IIS states that it
can't create the object. I have tried similar code in a straight .vbs file
and it worked fine. So it looks like IIS can't create the Wscript.Shell
object. My third server has no problem and I can't find any differences
between the configurations of IIS between servers. As I've done very little
to alter things on the servers I'm guessing that this is probably a common
problem and I would like to understand what's going on here. Thanks in
advance to anyone who can give me a clue on this.


Jon

Re: IIS Server.CreateObject issue.. by Paul

Paul
Tue Apr 13 16:15:43 CDT 2004

Jon,

You probably do not have sufficient permissions to execute all the script
contained in the page. That doesn't mean you did anything wrong though!

I can't find a KB article that explains the exact situation you have come
across, but these two are similar or related:

http://support.microsoft.com/default.aspx?scid=kb;en-us;251361
http://support.microsoft.com/default.aspx?scid=kb;en-us;255650

Paul

"Jon" <jonwest@msn.removeme.com> wrote in message
news:OG5MgoZIEHA.1048@TK2MSFTNGP12.phx.gbl...
> I'm new to IIS, so apologies if this is a silly question due to my lack of
> knowledge. I have encountered the following issue on 2 of the 3 webservers
> I'm working with. The problem is that the servers are unable to serve the
> default localstart.asp page that is installed with IIS. I've traced the
> problem down to the following ASP code:
>
> Dim WshShell, ver
> Set WshShell = Server.CreateObject("Wscript.Shell")
> On Error Resume Next
> ver = 0
> ver = WshShell.RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows
> NT\Printers\DisableWebPrinting")
>
>
> The exact problem is with the CreateObject statement, IIS states that it
> can't create the object. I have tried similar code in a straight .vbs file
> and it worked fine. So it looks like IIS can't create the Wscript.Shell
> object. My third server has no problem and I can't find any differences
> between the configurations of IIS between servers. As I've done very
little
> to alter things on the servers I'm guessing that this is probably a common
> problem and I would like to understand what's going on here. Thanks in
> advance to anyone who can give me a clue on this.
>
>
> Jon
>
>



Re: IIS Server.CreateObject issue.. by Paul

Paul
Wed Apr 14 04:48:06 CDT 2004

On Tue, 13 Apr 2004 16:58:47 -0400, "Jon" <jonwest@msn.removeme.com>
wrote:

>I'm new to IIS, so apologies if this is a silly question due to my lack of
>knowledge. I have encountered the following issue on 2 of the 3 webservers
>I'm working with. The problem is that the servers are unable to serve the
>default localstart.asp page that is installed with IIS. I've traced the
>problem down to the following ASP code:
>
>Dim WshShell, ver
>Set WshShell = Server.CreateObject("Wscript.Shell")
>On Error Resume Next
>ver = 0
>ver = WshShell.RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows
>NT\Printers\DisableWebPrinting")
>
>
>The exact problem is with the CreateObject statement, IIS states that it
>can't create the object. I have tried similar code in a straight .vbs file
>and it worked fine. So it looks like IIS can't create the Wscript.Shell
>object. My third server has no problem and I can't find any differences
>between the configurations of IIS between servers. As I've done very little
>to alter things on the servers I'm guessing that this is probably a common
>problem and I would like to understand what's going on here. Thanks in
>advance to anyone who can give me a clue on this.
>
>
>Jon

Jon,

Try running Filemon and Regmon whilst executing the above code and you
should see why it is failing. Its sounds like a permissions issue :

http://www.sysinternals.com/ntw2k/source/regmon.shtml

http://www.sysinternals.com/ntw2k/source/filemon.shtml


Regards,

Paul Lynch
MCSE

Re: IIS Server.CreateObject issue.. by Jon

Jon
Tue Apr 20 15:23:35 CDT 2004

Thanks for the good replies, I finally figured it out...sort of. I upgraded
the version of WSH on the 2 machines that were giving me ther error to 5.6
and...shazammmm....everything started working. Thanks again guys.


Jon