/// Frank Hagen: Professional Web Developer, C# User, Reformed Über-geek RSS 2.0
# Monday, October 16, 2006

When I restarted this blog using DasBlog, I wanted a configuration that I could install on my USB key and run from anywhere with IIS.  I was able to leverage DasBlog to do that with some custom scripting to automatically install the VirtDir.  Everything was great.  Then I moved to another company and got a new workstation.  The script still works great, but since my machine defaults to ASP.NET 1.1, I have to manually modify the IIS Config after running the script to allow the 2.0 runtime I have DasBlog configured for.  It's a minor annoyance and one I will solve by finding a solution to the script, or getting everyone defaulted to 2.0 (which is happening!).  The script is below:

Set shell = Wscript.CreateObject( "WScript.Shell" )
Set fso = WScript.CreateObject( "Scripting.FileSystemObject" )
vDirName = "DasBlog"
vDirPath = fso.GetFolder( ".\dasblogce" ).Path
'Using IIS Administration object , turn on script/execute permissions and define the virtual directory as an 'in-process application.
Set objIIS = GetObject( "IIS://localhost/W3SVC/1/Root" )
Set vDirObj = objIIS.Create( "IISWebVirtualDir" , vDirName )
vDirObj.Path = vDirPath
vDirObj.AuthNTLM = True
vDirObj.AccessRead = True
vDirObj.AccessWrite = True
vDirObj.AccessScript = True
vDirObj.AccessExecute = True
vDirObj.AuthAnonymous = True
'vDirObj.AnonymousUserName = owner
vDirObj.AnonymousPasswordSync = True
vDirObj.EnableDefaultDoc = True
vDirObj.DefaultDoc = "default.aspx"
vDirObj.AppCreate2 1
vDirObj.SetInfo
''UpdateScriptMaps(vDirPath)
If Err.Number > 0 Then
WScript.echo Err.Description
WScript.Quit
Else
WScript.echo "Virtual directory created."
End If
Monday, October 16, 2006 3:13:59 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] -
.NET | Blog
All comments require the approval of the site owner before being displayed.
OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: b, blockquote@cite, i, strike, strong, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
<%--
--%>
Statistics
Total Posts: 189
This Year: 2
This Month: 0
This Week: 0
Comments: 74
Locations of visitors to this page
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
Frank W Hagen
Sign In
All Content © 2012, Frank W Hagen
Custom DasBlog theme based on 'Business' by Christoph De Baene