You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/PSADT/PSADT/ProcessManagement/RunningProcessInfo.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ public sealed record RunningProcessInfo
24
24
/// <remarks>This method identifies running processes by comparing their names and command-line arguments against the provided process definitions. If a process definition includes a filter, only processes that satisfy the filter are included in the result. Processes that cannot be accessed due to insufficient privileges are skipped.</remarks>
25
25
/// <param name="processDefinitions">An array of <see cref="ProcessDefinition"/> objects that define the processes to search for. Each definition specifies the name, optional description, and an optional filter to match processes.</param>
26
26
/// <returns>A read-only list of <see cref="RunningProcessInfo"/> objects representing the processes that match the given definitions. The list is ordered by the description of the running processes.</returns>
ProcessDefinition[]msiExecList=[.. (!string.IsNullOrWhiteSpace(DefaultMstFile)?MsiUtilities.GetMsiTableColumnValues(DefaultMsiFile!,"File",3,DefaultMstFile!):MsiUtilities.GetMsiTableColumnValues(DefaultMsiFile!,"File",3)).Where(static p =>p.EndsWith(".exe",StringComparison.OrdinalIgnoreCase)).Select(static p =>newProcessDefinition(Path.GetFileNameWithoutExtension(p.Split(['|'],StringSplitOptions.RemoveEmptyEntries).Last())))];
392
+
ProcessDefinition[]msiExecList=[.. (!string.IsNullOrWhiteSpace(DefaultMstFile)?MsiUtilities.GetMsiTableColumnValues(DefaultMsiFile!,"File",3,[DefaultMstFile!]):MsiUtilities.GetMsiTableColumnValues(DefaultMsiFile!,"File",3)).Where(static p =>p.EndsWith(".exe",StringComparison.OrdinalIgnoreCase)).Select(static p =>newProcessDefinition(Path.GetFileNameWithoutExtension(p.Split(['|'],StringSplitOptions.RemoveEmptyEntries).Last())))];
393
393
if(msiExecList.Length>0)
394
394
{
395
395
AppProcessesToClose=newReadOnlyCollection<ProcessDefinition>([.. AppProcessesToClose.Concat(msiExecList).GroupBy(static p =>p.Name,StringComparer.OrdinalIgnoreCase).Select(static g =>g.First())]);
@@ -398,7 +398,7 @@ public DeploymentSession(IReadOnlyDictionary<string, object>? parameters = null,
0 commit comments