Dana,
 
Thanks for that :)
 
It wasn't exactly what I was looking for... but it did point out that what I was doing with aspnet_regiis was too extreme. Just doing an "aspnet_regiis -i" affects all websites all virtual directories... which isn't what I want at all... I want just a single virtual directory (aspnet_regiis -sn).
 
However I did incorporate your code into my EnableASPNET _vbscript_ based custom action... thanks!
 
Regards,
 
Rob


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dana Gutride
Sent: Wednesday, November 01, 2006 5:02 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] How to check if ASP.NET is enabled?

You can write a custom action that checks the metabase for that.  I'll attach a snippet of vbs that you convert to c++ if you'd like.  One thing to keep in mind, I'm pretty sure this property doesn't exist on Windows 2000 or XP (IIS 6 only), so I'd be careful in scheduling the custom action.

Dana

Set oWebServer = GetObject("IIS://Localhost/W3SVC")
                For ValueIndex = 0 To UBound(oWebServer.WebSvcExtRestrictionList)
                    current = oWebServer.Get("WebSvcExtRestrictionList")(ValueIndex)
                    aCurrent = Split(current, ",")
                    if UBound(aCurrent) > 2 then
                        Dim cur
                        cur = aCurrent(3)
                        if aCurrent(0) = 0 and InStr(cur, " ASP.NET v2") > 0 then
                            'g_oSession.logError("Setup has detected that ASP.NET is disabled in the IIS Restricted Extensions List. <a target='_blank' href= "" href="http://www.microsoft.com/resources/documentation/IIS/6/all/techref/en-us/IISRG_WAS_8.mspx">http://www.microsoft.com/resources/documentation/IIS/6/all/techref/en-us/IISRG_WAS_8.mspx>Click here</a> for more information.")
                            Exit Function
                        end if
                    end if
                Next

On 11/1/06, Rob MacFadyen <[EMAIL PROTECTED]> wrote:
Hey all,

Does anyone know how to check if ASP.NET 2.0 is _enabled_?

Right now I'm always doing an "aspnet_regiis -i"... but this is taking maybe
10 seconds... which seems like a waste if ASP.NET is _already_ enabled.
Picky picky... but after testing and testing and testing any time savings
would be appreciated :)

Regards,

Rob




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to