VBS运行程序带参数怎么写

VBS运行程序带参数怎么写,第1张

demo

Dim aa=inputbox("请键入参数(Please Input the Parameter):" , "Configuration to start")wscriptcreateobject("wscriptshell")run("cmd /k ipconfig " & a)

运行文件和参数直接写在双引号内。

是微软公司出品的脚本语言,有时也被缩写为VBS。

VBScript是asp动态网页默认的编程语言,配合asp内建对象和ADO对象,用户很快就能掌握访问数据库的asp动态网页开发技术。

#include <stringh>

#include <iostream>

#include <cstdlib>

using namespace std;

int main(int argc, char argv)

{

if (argc < 3)

{

cout << "Usage : testexe /user:someone /pwd:password" << endl;

exit(-1);

}

const char user = "someone";

const char pswd = "something";

char u = argv[1], p = argv[2];

while (u++ != ':');

while (p++ != ':');

if (strcmp(u, user) || strcmp(p, pswd))

{

cout << "User name or Password invalid! exiting" << endl;

exit(-1);

}

cout << "Hello, " << user << endl;

system("PAUSE");

return 0;

}

以上就是关于VBS运行程序带参数怎么写全部的内容,包括:VBS运行程序带参数怎么写、如何让VC编的程序带参数运行、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/9393888.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-27
下一篇 2023-04-27

发表评论

登录后才能评论

评论列表(0条)

保存