diff options
author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2015-07-30 12:05:56 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2015-07-30 12:05:56 -0700 |
commit | 1e3d5c4d87ce6e92bbb42d0f9675ec36f9e4929c (patch) | |
tree | 101d0dbd2b22c4b27fce718f250fdef92dffaa21 /osdep/OSUtils.cpp | |
parent | 6f46f0e0e1f0dd01f0e7bdaa700b11d2c54d0794 (diff) | |
download | infinitytier-1e3d5c4d87ce6e92bbb42d0f9675ec36f9e4929c.tar.gz infinitytier-1e3d5c4d87ce6e92bbb42d0f9675ec36f9e4929c.zip |
Suppress icacls output on lockDownFile().
Diffstat (limited to 'osdep/OSUtils.cpp')
-rw-r--r-- | osdep/OSUtils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/osdep/OSUtils.cpp b/osdep/OSUtils.cpp index 0ff7bfc4..45fbf100 100644 --- a/osdep/OSUtils.cpp +++ b/osdep/OSUtils.cpp @@ -125,7 +125,7 @@ void OSUtils::lockDownFile(const char *path,bool isDir) startupInfo.cb = sizeof(startupInfo); memset(&startupInfo,0,sizeof(STARTUPINFOA)); memset(&processInfo,0,sizeof(PROCESS_INFORMATION)); - if (CreateProcessA(NULL,(LPSTR)(std::string("C:\\Windows\\System32\\icacls.exe \"") + path + "\" /inheritance:d /Q").c_str(),NULL,NULL,FALSE,0,NULL,NULL,&startupInfo,&processInfo)) { + if (CreateProcessA(NULL,(LPSTR)(std::string("C:\\Windows\\System32\\icacls.exe \"") + path + "\" /inheritance:d /Q").c_str(),NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,&startupInfo,&processInfo)) { WaitForSingleObject(processInfo.hProcess,INFINITE); CloseHandle(processInfo.hProcess); CloseHandle(processInfo.hThread); @@ -134,7 +134,7 @@ void OSUtils::lockDownFile(const char *path,bool isDir) startupInfo.cb = sizeof(startupInfo); memset(&startupInfo,0,sizeof(STARTUPINFOA)); memset(&processInfo,0,sizeof(PROCESS_INFORMATION)); - if (CreateProcessA(NULL,(LPSTR)(std::string("C:\\Windows\\System32\\icacls.exe \"") + path + "\" /remove *S-1-5-32-545 /Q").c_str(),NULL,NULL,FALSE,0,NULL,NULL,&startupInfo,&processInfo)) { + if (CreateProcessA(NULL,(LPSTR)(std::string("C:\\Windows\\System32\\icacls.exe \"") + path + "\" /remove *S-1-5-32-545 /Q").c_str(),NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,&startupInfo,&processInfo)) { WaitForSingleObject(processInfo.hProcess,INFINITE); CloseHandle(processInfo.hProcess); CloseHandle(processInfo.hThread); |