方法一,先调用CMD然后执行命令
ShellExecute(NULL,"open","cmd.exe",NULL,NULL,SW_SHOWNORMAL);
指定为桌面的代码也给你了
ShellExecute(NULL,"open","cmd.exe",NULL,"C://Documents
and
Settings//****//桌面",SW_SHOWNORMAL);
方法二,直接调用程序
ShellExecute(NULL,"open","c://Documents
and
Settings//****//桌面//daycount.exe",NULL,NULL,SW_SHOWNORMAL);
*****是我的计算机名,不好意思隐藏了~