Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Updating the acl setting to handle access denied cases with a pretty …
Browse files Browse the repository at this point in the history
…error
  • Loading branch information
andysterland committed May 5, 2016
1 parent a26b2c4 commit 31f2c43
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions EdgeDiagnosticsAdapter/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,20 @@ void setSecurityACLs()
if (dwRes == ERROR_SUCCESS)
{

}
else if (dwRes == ERROR_ACCESS_DENIED)
{
wcout << L"You do not have the required modify permission " << fullPath << " on to allow access to from Edge.";
wcout << L"\n";
wcout << L"You can either:";
wcout << L"\n 1) Grant yourself the modify permission on the parent folder (" << fullPath << ").";
wcout << L"\n 2) Grant the Read & Execute permissions on the parent folder (" << fullPath << ") to the user " << (LPTSTR)pAllAppPackagesSID << ".";
wcout << L"\n 3) Run this again as an administrator.";
wcout << L"\n";
}
else
{
// The ACL was not set, this isn't fatal as it only impacts IE in EPM and Edge and the user can set it manually
wcout << L"Could not set ACL to allow access to IE EPM or Edge.";
wcout << L"Could not set ACL to allow access from Edge.";
wcout << L"\n";
wcout << Helpers::GetLastErrorMessage().GetBuffer();
wcout << L"\n";
Expand Down

0 comments on commit 31f2c43

Please sign in to comment.