码迷,mamicode.com
首页 > 编程语言 > 详细

在VC++中执行VBS代码

时间:2018-11-25 11:45:44      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:main   时间   follow   internet   namespace   detail   out   https   log   

此代码来自https://blog.csdn.net/zhu2695/article/details/13770671

作者:    时间:2013年10月31日 13:08:41

#include<fstream>
using namespace std;

int main()
{
fstream out("StartIE.vbs",ios::out);

out<<"AppName=\"启动IE\"\n\
Set Wshell=WScript.CreateObject(\"WScript.Shell\")\n\
Set ie=WScript.CreateObject(\"InternetExplorer.Application\")\n\
ie.Navigate \"http://www.duba.com/\"\n\
ie.Visible=0\n";//注意:最后一句也要加个换行符‘\n‘

out.close();
system("StartIE.vbs");
system("del StartIE.vbs");

return 0;
}
---------------------
作者:zhu2695
来源:CSDN
原文:https://blog.csdn.net/zhu2695/article/details/13770671
版权声明:本文为博主原创文章,转载请附上博文链接!

在VC++中执行VBS代码

标签:main   时间   follow   internet   namespace   detail   out   https   log   

原文地址:https://www.cnblogs.com/myboat/p/10014701.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!