NetBox打包asp文件为可执行文件exe

   NetBox打包asp文件为可执行文件exe示例。

  将下面内容存为.box后缀的文件,然后放到你的网站根目录下。

Dim httpd
Shell.Service.RunService "NBWeb", "NetBox Web Server", "NetBox Http Server Sample"
'———————- Service Event ———————
Sub OnServiceStart()
Set httpd = NetBox.CreateObject("NetBox.HttpServer")
If httpd.Create("", 8080) = 0 Then
Set host = httpd.AddHost("", "")
host.EnableScript = true
'———————-默认首页文件定义
host.AddDefault "index.asp"
host.AddDefault "default.asp"
host.AddDefault "default.htm"
host.AddDefault "login.asp"
httpd.Start
'——–下面这里是定义运行exe文件后直接打开一个网页窗口,可以不要,直接在浏览器通过地址打开
Set htWin= CreateObject("NetBox.HtmlWindow")
htWin.ContextMenu=false
htWin.AllowClose=true
htWin.Width=723
htWin.Height=584
htWin.Title="NetBox打包asp文件为可执行文件exe"
htWin.scrollbar=false
htWin.Open "http://127.0.0.1:8080/"
htWin.ShowDialog
else
Shell.Quit 0
end if
End Sub
Sub OnServiceStop()
httpd.Close
'Shell.Quit 0
End Sub
Sub OnServicePause()
httpd.Stop
End Sub
Sub OnServiceResume()
httpd.Start
End Sub

  在你的.box文件上邮件,点击Build编译生成exe文件,注意文件类型选择executeable file。

NetBox打包asp文件为可执行文件exe

NetBox下载地址:NetBox下载

加支付宝好友偷能量挖...


原创文章,转载请注明出处:NetBox打包asp文件为可执行文件exe

评论(0)Web开发网
阅读(390)喜欢(1)Asp/VBScript