diff --git a/TileIconifier.Core/Shortcut/ShortcutItem.cs b/TileIconifier.Core/Shortcut/ShortcutItem.cs index 1a58c43..b685084 100644 --- a/TileIconifier.Core/Shortcut/ShortcutItem.cs +++ b/TileIconifier.Core/Shortcut/ShortcutItem.cs @@ -158,7 +158,10 @@ public string TargetFilePath get { if (string.IsNullOrEmpty(_targetFilePath)) + { _targetFilePath = ShortcutUtils.GetTargetPath(ShortcutFileInfo.FullName); + } + return Environment.ExpandEnvironmentVariables("%PATHEXT%").Split(';').Any( e => diff --git a/TileIconifier/Forms/Main/FrmMainMethods.Designer.cs b/TileIconifier/Forms/Main/FrmMainMethods.Designer.cs index 4b6bd05..279f718 100644 --- a/TileIconifier/Forms/Main/FrmMainMethods.Designer.cs +++ b/TileIconifier/Forms/Main/FrmMainMethods.Designer.cs @@ -75,10 +75,10 @@ private void FullUpdate(object sender, DoWorkEventArgs e) catch (Exception ex) { FrmException.ShowExceptionHandler(ex); - FormUtils.ShowMessage(this, + Invoke(new Action(() => FormUtils.ShowMessage(this, Strings.PowershellErrorFull, Strings.PowershellFailure, MessageBoxButtons.OK, - MessageBoxIcon.Error); + MessageBoxIcon.Error))); Invoke(new Action(() => getPinnedItemsRequiresPowershellToolStripMenuItem_Click(this, null))); } }