sprintf(chars,"shutdown -s -t %d",(int)(time));
WinExec(chars,SW_HIDE);
//system(chars);
WinExec("shutdown -a",SW_HIDE);
//system("shutdown -a");
WinExec("shutdown /r /t 1",SW_HIDE);
//system("shutdown /r /t 1");
以和为 2016/7/21 16:38:12
#include<stdio.h>
#include<stdlib.h>
int
main(){
system
(
"start /b ping 10.10.10.11 -t"
);
return
0;
}
VS中隐藏窗口方法
VC下要隐藏黑色的DOS窗口,在程序中添加
#pragma comment( linker,"/subsystem:\"windows\"/entry:\"mainCRTStartup\"" )
ASCI版
/subsystem:console/entry:mainCRTStartup (ANSI版)
UNICODE版
/subsystem:console/entry:wmainCRTStartup (UNICODE版)
Windows应用程序
/subsystem:windows /entry:WinMain (ANSI版)
/subsystem:windows /etnry:wWinMain (UNICODE版)
7、http://blog.youkuaiyun.com/crcr/article/details/5722219
shellexcute这个不行吗??https://zhidao.baidu.com/question/171516999.html
ShellExecute(
hWnd,
"open",
"command.exe",
"命令行",
NULL,
SW_HIDE
);
中隐藏窗口方法
VC
下要隐藏黑色的
DOS
窗口,在程序中添加
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
ASCI
版
/subsystem:console /entry:mainCRTStartup (ANSI
版
)
UNICODE
版
/subsystem:console /entry:wmainCRTStartup (UNICODE
版
)
Windows
应用程序
/subsystem:windows /entry:WinMain (ANSI
版
)
/subsystem:windows /etnry:wWinMain (UNICODE
版
)