Skip to content

[IMPROVEMENT] duplicated calls to cmd.exe in generated powershell-script #4903

@AlBundy33

Description

@AlBundy33

Please confirm these before moving forward.

  • I have searched for my feature proposal and have not found a work-in-progress/duplicate/resolved/discarded issue.
  • This improvement refers to an existing feature. If you want to suggest a new feature, please use this template.
  • This improvement is not a bug. If you want to report a bug, please use this template.

Describe the improvement

The generated powershell-script generates a command array like

$commands= @(
    'cmd.exe /C winget.exe install --id "7zip.7zip" --exact --source winget --accept-source-agreements --disable-interactivity --silent --accept-package-agreements --force'
)

and calls each command with

foreach ($command in $commands) {
    Write-Host "Running: $command" -ForegroundColor Yellow
    cmd.exe /C $command
    ...
}

This results in a call like

cmd.exe /C cmd.exe /C winget.exe install ...

It's not a big deal but...

Describe how this improvement could help users

Script uses less disk-space and is faster due to lesser app calls 😆😆😆😆😆

Not a big deal or bug or anything - just a cosmetic thing.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions