[thelist] Creating IIS Virtuals - how to?
Wallace, Mark
mwallace at bindview.com
Fri Nov 2 14:40:52 CST 2001
Actually, I answered my own question with a bit of hardcore research:
How do I create a virtual in IIS withOUT using the MMC?
The point is, to create a backend Cold Fusion script that allows our
marketing department to create custom URLs for ad campaigns without the
webmaster having to go create and/or delete the virtual manually in the MMC
- for example, they want to be able to make http://yoursite/FreebieGiveAway
; I have a directory set up outside my webroot for "campaigns" that they can
put whatever they want into, so I can have CF create the folder
"FreebieGiveAway" under Campaigns, then automatically create the virtual in
the same script (using CFExecute); I can also give them a script to delete
it when they're done with it.
<tip type="Creating IIS Virtuals from Command Line" author="Mark Wallace">
Two methods:
1) Using VBScript: (although why anyone would want to run the Windows
Scripting Host on a production webservber is beyond me)
http://www.iisfaq.com/Articles/300/
2) Using CrtVDir.exe (available from Microsoft). Source code is available
here:
http://download.microsoft.com/download/iis40/Sample/1/NT4/EN-US/Crtvdird.exe
(01/01/2001)
and the related article is here:
http://support.microsoft.com/support/kb/articles/q188/9/54.asp
Actually the MS KB article is only half a solution - it provides source code
for an executable which will do the job. I'm a webmaster, not a programmer,
but I do work in a software development company, so I weaseled a compilation
out of one of our developers - this exe can be compiled in Visual C++ 5 or 6
(although it's a bit more involved using 6). I'd post the compiled version,
but that would probably be copyright infringement.
</tip>
Mark Wallace
Webmaster
BindView Corporation
More information about the thelist
mailing list