惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
U
Unit 42
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
B
Blog RSS Feed
Vercel News
Vercel News
F
Fortinet All Blogs
Know Your Adversary
Know Your Adversary
T
Troy Hunt's Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
A
About on SuperTechFans
Jina AI
Jina AI
小众软件
小众软件
T
Threatpost
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
Scott Helme
Scott Helme
B
Blog
腾讯CDC
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
S
Schneier on Security
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
K
Kaspersky official blog
G
Google Developers Blog
T
Tor Project blog
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
Google Online Security Blog
Google Online Security Blog
Latest news
Latest news
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
罗磊的独立博客

博客园 - 小牛哥

招聘.NET软件工程师 2人 招聘.NET软件工程师 2人 招聘.NET高级程序员[深圳] Windows 2003不能用 '..' 表示父目录解决方法 判断一个字符是否为汉字 Migration from J2EE to .NET 无法打开 Web 项目“DottextWeb”问题的解决 如何解决一个小问题:当前不会命中断点 Lucene.Net的问题我找到了,郁闷 插入表情图标的功能 事务死锁的问题如何解决? 创建虚拟目录和移除虚拟目录 - 小牛哥 - 博客园 Unclean shutdown of previous Apache run? - 小牛哥 VB.NET实现Singleton模式 启动一个进层阻止当前线程 使用DataReader填充DataTable Asc和Chr 获得一个随机数 将Html代码转换为Text
使用JS创建虚拟目录,并引导进入浏览
小牛哥 · 2005-04-19 · via 博客园 - 小牛哥

使用JS,可以替代Windows安装方式:
代码也比较简单:)

创建一个setup.js文件,内容为:

var fso = new ActiveXObject("Scripting.FileSystemObject"
var svcPath = "IIS://localhost/W3SVC/1" 
var svcRoot = GetObject(svcPath) 
var webRoot = svcRoot.GetObject("IIsWebVirtualDir""Root"

try
{
    
var objVDir1 = webRoot.Create("IIsWebVirtualDir""dbnetoffice"
    objVDir1.Path 
= fso.GetAbsolutePathName(".")
    objVDir1.AppCreate(
2
    objVDir1.AppFriendlyName 
= "DotNetDemo"
    objVDir1.SetInfo()
}
catch(ex) 
{
//    WScript.Echo(ex.description + "(" + ex.number + ")" )
}

var o = new ActiveXObject("WScript.NetWork"
var wshShell = new ActiveXObject("WScript.Shell")
wshShell.Run(
"iexplore.exe http://" + o.ComputerName + "/DotNetDemo/default.aspx")

会创建虚拟目录DotNetDemo虚拟目录,并且打开一个浏览器,浏览DotNetDemo虚拟目录中的default.aspx文件.

很简单,不罗嗦.

posted on 2005-04-19 09:22  小牛哥  阅读(2766)  评论(5)    收藏  举报

刷新页面返回顶部