Skip to content
Snippets Groups Projects
Commit 3f7fd9dc authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Check and report size of user profiles on startup

NOTE: this is known to fail for permission reasons, the commit is in
fact just to save the code and serve as an example (and to be reverted
right away).

Relates to #20
parent b4245bf7
No related branches found
No related tags found
No related merge requests found
......@@ -403,6 +403,19 @@ namespace ATxService
}
Log.Debug(msg);
Log.Info("User Profile Directories:");
var profilesDir = new DirectoryInfo(@"C:\Users");
foreach (var userProfile in profilesDir.GetDirectories()) {
Log.Info(userProfile.Name);
try {
var userProfileSize = FsUtils.GetDirectorySize(userProfile.FullName);
Log.Info(userProfileSize);
}
catch (Exception e) {
Log.Error($"getting size of [{userProfile.FullName}] failed: {e.Message}");
}
}
}
#endregion
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment