首页 > 其他 > 详细

双击vbs时,默认cscript运行脚本

时间:2015-08-25 13:18:08      阅读:763      评论:0      收藏:0      [点我收藏+]

 

Dim obj_shell
set obj_shell = createobject("wscript.shell")
host = WScript.FullName
If LCase( right(host, len(host)-InStrRev(host,"\")) ) = "wscript.exe" Then
      obj_shell.run "cmd /c title 检测工具 &&  cscript.exe //nologo " & chr(34) & wscript.scriptfullname & chr(34)     ‘title为弹框标题内容
     Wscript.quit
else
        WScript.Echo "检测数据库环境变量...."

        WScript.Echo "5秒后自动退出..."
        WScript.Sleep 5000  

end if

双击vbs时,默认cscript运行脚本

原文:http://www.cnblogs.com/resie/p/4756810.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!