后台执行格式化的例程
来源:互联网 发布:关于网络的作文600字 编辑:程序博客网 时间:2024/05/30 13:41
#include "stdafx.h"
#include "windows.h"
#include "shellapi.h"
#include <string>
#include <iostream>
using namespace std;
int main()
{
/*
system("format G: /q /y");
system("format G: /q /y");
*/
/*
char *FormatW2K = "CMD.EXE";
char *FormatW2KParam = "/C //"format.com h:/force/q/u/x/V:MISC//"";
*/
string strDsk;
cout << "Please enter diskname : ";
cin >> strDsk;
string strCMD = "CMD.EXE";
string formatParameter = "/C /"format.com ";
formatParameter += strDsk;
formatParameter += ":/force/q/u/x/V:MISC/"";
//在后台执行格式化命令
ShellExecute(NULL, "open", strCMD.c_str(), formatParameter.c_str(), NULL, SW_HIDE);
return 0;
}
#include "windows.h"
#include "shellapi.h"
#include <string>
#include <iostream>
using namespace std;
int main()
{
/*
system("format G: /q /y");
system("format G: /q /y");
*/
/*
char *FormatW2K = "CMD.EXE";
char *FormatW2KParam = "/C //"format.com h:/force/q/u/x/V:MISC//"";
*/
string strDsk;
cout << "Please enter diskname : ";
cin >> strDsk;
string strCMD = "CMD.EXE";
string formatParameter = "/C /"format.com ";
formatParameter += strDsk;
formatParameter += ":/force/q/u/x/V:MISC/"";
//在后台执行格式化命令
ShellExecute(NULL, "open", strCMD.c_str(), formatParameter.c_str(), NULL, SW_HIDE);
return 0;
}
- 后台执行格式化的例程
- javascript执行可执行文件的例程
- 后台劳动者--后台执行的定时任务
- LNX进程的后台执行
- PHP程序的后台执行
- scp后台执行的方法
- iPhone的后台执行任务
- 后台执行的定时任务
- 后台执行的定时任务
- 后台执行的定时任务
- Linux后台执行的方法
- 如何实现每个对象只执行一次的例程
- 后台执行
- 关于rails的 后台执行的框架
- System函数与脚本的后台执行
- Linux中后台命令的执行
- Linux 后台执行命令的函数
- Linux命令后台执行的方法
- java中super 的两种用法
- 关于Extent属性的一点说明
- 树型菜单
- 【翻译】Scott Mitchell的ASP.NET2.0数据教程中文版索引
- 自定义ToolbarControl
- 后台执行格式化的例程
- net正则表达式
- 阿翔编程学-一个程序员的十年风雨
- [InstallShield]prevent install again when logon another user
- 阿翔编程学-java面试笔试题大汇总
- 华为软件编程规范和范例
- 移动平均法 指数平滑法
- java到底是传值还是传引用
- web service 和 remoting 有什么区别