一次按键怎么同时运行2个或多个EXE应用程序???知道的告诉我哦。。。。

来源:百度知道 编辑:UC知道 时间:2024/06/28 05:11:40
一次按键怎么同时运行多个EXE应用程序的话!!有些东西就方便多了````
比如弄别人的木马啊```。。。

用 一个API 叫 WinExec 呀
VB的声明如下 :
Declare Function WinExec Lib "kernel32" Alias "WinExec" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long

C的声明如下:
UINT WinExec(
LPCSTR lpCmdLine, // address of command line
UINT uCmdShow // window style for new application
);

说明:
lpCmdLine String,包含要执行的命令行
nCmdShow Long,定义了以怎样的形式启动程序的常数值。参考ShowWindow函数的nCmdShow参数

例如
WinExec("你的程序1 路径",SW_HIDE);
WinExec("你的程序2 路径",SW_HIDE);
WinExec("你的程序3 路径",SW_HIDE); //OK了

制作一个bat文件