diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs
index 72b7b0a91..b93fb23c9 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs
@@ -97,8 +97,8 @@ namespace Flow.Launcher.Plugin.Program.Programs
}
// To initialize the app description
- public String description = String.Empty;
-
+ public string description = string.Empty;
+ public string arguments = string.Empty;
// Retrieve the target path using Shell Link
public string retrieveTargetPath(string path)
@@ -122,13 +122,16 @@ namespace Flow.Launcher.Plugin.Program.Programs
buffer = new StringBuilder(MAX_PATH);
((IShellLinkW)link).GetDescription(buffer, MAX_PATH);
description = buffer.ToString();
+
+ buffer.Clear();
+ ((IShellLinkW)link).GetArguments(buffer, MAX_PATH);
+ arguments = buffer.ToString();
}
// To release unmanaged memory
Marshal.ReleaseComObject(link);
return target;
-
}
}
-}
\ No newline at end of file
+}
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
index d973185b2..7fbffb548 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
@@ -26,11 +26,11 @@ namespace Flow.Launcher.Plugin.Program.Programs
public string UniqueIdentifier { get => _uid; set => _uid = value == null ? string.Empty : value.ToLowerInvariant(); } // For path comparison
public string IcoPath { get; set; }
///
- /// Path of the file. It's the path of .lnk or .url for .lnk and .url.
+ /// Path of the file. It's the path of .lnk and .url for .lnk and .url files.
///
public string FullPath { get; set; }
///
- /// Path of the excutable for .lnk, or the URL for .url.
+ /// Path of the excutable for .lnk, or the URL for .url. Arguments are included if any.
///
public string LnkResolvedPath { get; set; }
///
@@ -185,7 +185,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
{
var info = new ProcessStartInfo
{
- FileName = ExecutablePath,
+ FileName = FullPath,
WorkingDirectory = ParentDirectory,
Verb = "runas",
UseShellExecute = true
@@ -275,6 +275,12 @@ namespace Flow.Launcher.Plugin.Program.Programs
program.LnkResolvedPath = Path.GetFullPath(target);
program.ExecutableName = Path.GetFileName(target);
+ var args = _helper.arguments;
+ if(!string.IsNullOrEmpty(args))
+ {
+ program.LnkResolvedPath += " " + args;
+ }
+
var description = _helper.description;
if (!string.IsNullOrEmpty(description))
{