可以用system 去调用批处理的
#include
#include
#include
int main()
{
char rarPath[256];
puts(_T("填入你系统的WINRAR.exe所在目录:"));
gets(rarPath);
SetCurrentDirectory(rarPath);
//解压c:\1.rar到Myjpg目录里
char* lcm="rar x \"c:\\1.rar\" \"c:\\Myjpg\\\"";
printf("shell command line :%s\n",lcm);
system(lcm);
puts(_T("解压完毕."));
return 0;
}