fix issue #40, run accurate command with normal user privilege to restore window from disk

This commit is contained in:
Kang Yu 2020-09-19 18:10:32 -07:00
parent 592e871801
commit 4be1f7ff2a
3 changed files with 40 additions and 26 deletions

View file

@ -195,15 +195,15 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
if (string.IsNullOrEmpty(line))
return;
//Log.Info("{0}", line);
string[] words = line.Split(',');
if (words.Length < 3)
string[] fields = line.Split(',');
if (fields.Length < 3)
return;
uint processId;
if (uint.TryParse(words[2], out processId))
if (uint.TryParse(fields[2], out processId))
{
if (!string.IsNullOrEmpty(words[1]))
if (!string.IsNullOrEmpty(fields[1]))
{
pwp.processTbl[processId] = words[1];
pwp.processCmd[processId] = fields[1];
}
}
}