I come up with this code. It will execute correctly and return true. but it doesn't change Path variable's value. When I type like this --> setx Path "C:\Program Files\Java\jdk1.7.0_02\bin\" in cmd, it works and change the Path value
here is the code
// Prepare shellExecutInfo
SHELLEXECUTEINFO ShRun = {0};
ShRun.cbSize = sizeof(SHELLEXECUTEINFO);
ShRun.fMask = SEE_MASK_NOCLOSEPROCESS;
ShRun.hwnd = NULL;
ShRun.lpVerb =NULL;
ShRun.lpFile = "C:\\Windows\\System32\\setx.exe";
ShRun.lpParameters = "Path \"\"\"C:\\Program Files\\Java\\jdk1.7.0_02\\bin\\\"\"\"";
ShRun.lpDirectory =NULL;
ShRun.nShow = SW_SHOWNORMAL;
ShRun.hInstApp = NULL;
// Execute the file with the parameters
if(ShellExecuteEx(&ShRun))
printf("done");
else
printf("no");
what will be the problem here??