Try writing VBScript code that can handle errors (ON ERROR ... ), especially
for conditions that your code can expect to encounter. IIS is not installed
by default on XP.
You can also passively detect if IIS has been installed (but you have no
idea whether it works or not) by checking the Registry key
HKLM\Software\Microsoft\InetStp . GetObject tells you that IIS is "working"
and thus probably installed.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"LK" <anonymous.TakeThisOut@discussions.microsoft.com> wrote in message
news:bcff01c3ec9d$ba5c7d30$a601280a@phx.gbl...
I check for IIS object in a batch file.
First executing the vbs.
Then I check for errorlevel in batch file.
I do not get an errorlevel but a syntax error in XP.
>-----Original Message-----
>What do you mean by it does not work on Windows XP?
>
>If IIS is installed and minimally functional, that line
will succeed. If
>IIS is not installed or not functional, that line will
fail.
>
>IIS is not installed by default on Windows XP or Windows
Server 2000 while
>it is installed by default on Windows 2000.
>
>--
>//David
>IIS
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>//
>"LK" <anonymous.TakeThisOut@discussions.microsoft.com> wrote in
message
>news:b71401c3ec8e$2f5b7560$a001280a@phx.gbl...
>Hi,
>trying to detect if IIS is installed before deploying
>a .NET web application locally. (Unfortuneatly, VS setup
>tool checks for Framework first and then for IIS.)
>
>Tried s.th. like this:
>Set IIsObject = GetObject("IIS://localhost/w3svc")
>
>Then checking for error. But in Windows XP it does not
>work...Any ideas?
>
>
>.
><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: detect IIS installation