Skip to content

Commit 93fd88a

Browse files
committed
Change getting user name method
1 parent b56cae4 commit 93fd88a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

SaveWin10Pictures/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ private static void Main()
1414
List<string> files = new List<string>();
1515
int counter = 0;
1616
//string OSVersion = Environment.OSVersion.ToString(); // 6.2 ON Win 10
17-
string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
17+
//string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
18+
string userName = Environment.UserName;
1819
// remove domain if any
1920
if (userName.Contains("\\"))
2021
{

0 commit comments

Comments
 (0)