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

推荐订阅源

罗磊的独立博客
SecWiki News
SecWiki News
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
量子位
M
MIT News - Artificial intelligence
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
TaoSecurity Blog
TaoSecurity Blog
博客园 - 【当耐特】
H
Heimdal Security Blog
腾讯CDC
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
S
Schneier on Security
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Cybersecurity and Infrastructure Security Agency CISA
S
SegmentFault 最新的问题
大猫的无限游戏
大猫的无限游戏
Application and Cybersecurity Blog
Application and Cybersecurity Blog
F
Full Disclosure
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Threatpost
月光博客
月光博客
A
Arctic Wolf
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
T
Troy Hunt's Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
D
DataBreaches.Net
O
OpenAI News
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
小众软件
小众软件
V
Vulnerabilities – Threatpost
A
About on SuperTechFans
人人都是产品经理
人人都是产品经理
T
The Exploit Database - CXSecurity.com
Martin Fowler
Martin Fowler
美团技术团队
P
Privacy International News Feed

博客园 - 小牛哥

招聘.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)    收藏  举报

刷新页面返回顶部