Archived
Added: environment path support
This commit is contained in:
1 parent
b5a404735d
commit
a0147102b6
2 files changed
+14
-20
No files matched your search
@@ -283,21 +283,21 @@ namespace AppLauncher.Windows.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(model.ProcessFilename))
|
||||
if (string.IsNullOrWhiteSpace(model.CleanProcessFilename))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!File.Exists(model.ProcessFilename))
|
||||
if (!File.Exists(model.CleanProcessFilename))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ProcessStartInfo p = new ProcessStartInfo();
|
||||
p.FileName = model.ProcessFilename;
|
||||
p.FileName = model.CleanProcessFilename;
|
||||
p.WindowStyle = model.ProcessWindowStyle;
|
||||
if (!string.IsNullOrWhiteSpace(model.ProcessArgument)) p.Arguments = model.ProcessArgument;
|
||||
if (!string.IsNullOrWhiteSpace(model.ProcessWorkingDirectory)) p.WorkingDirectory = model.ProcessWorkingDirectory;
|
||||
if (!string.IsNullOrWhiteSpace(model.CleanProcessArgument)) p.Arguments = model.CleanProcessArgument;
|
||||
if (!string.IsNullOrWhiteSpace(model.CleanProcessWorkingDirectory)) p.WorkingDirectory = model.CleanProcessWorkingDirectory;
|
||||
if (model.ProcessAsAdmin) p.Verb = "runas";
|
||||
|
||||
MainForm parentForm = findMainForm();
|
||||
@@ -324,14 +324,14 @@ namespace AppLauncher.Windows.Forms
|
||||
|
||||
protected Image getIcon(TileModel model)
|
||||
{
|
||||
if (!File.Exists(model.ProcessFilename))
|
||||
if (!File.Exists(model.CleanProcessFilename))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return Icon.ExtractAssociatedIcon(model.ProcessFilename)?.ToBitmap();
|
||||
return Icon.ExtractAssociatedIcon(model.CleanProcessFilename)?.ToBitmap();
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user