1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| char command[255] = "C:\\Program Files\\cwRsyncServer\\bin\\rsync.exe";
char parameter [255] = "-aruv -F --exclude-from=/cygdrive/c/WINNT/exclude.conf \"/cygdrive/f/martins\" \"/cygdrive/z/synchro/profiles/\" >c:\\rsync.log";
int main()
{
using namespace std;
int a = 0;
SHELLEXECUTEINFO ExecuteInfo[a];
memset(&ExecuteInfo[a], 0, sizeof(ExecuteInfo[a]));
ExecuteInfo[a].cbSize = sizeof(ExecuteInfo[a]);
ExecuteInfo[a].fMask = 0;
ExecuteInfo[a].hwnd = 0;
ExecuteInfo[a].lpVerb = "open";
ExecuteInfo[a].lpFile = command;
ExecuteInfo[a].lpParameters = parameter;
ExecuteInfo[a].lpDirectory = 0;
ExecuteInfo[a].nShow = SW_SHOW;
ExecuteInfo[a].hInstApp = 0;
if(ShellExecuteEx(&ExecuteInfo[a]) == FALSE)
{
} |
Partager