AutomatedLab / AutomatedLab.Common

PowerShell module for daily administrative tasks and general helper functions
MIT License
65 stars 24 forks source link

Problem when MSI-files have spaces in filename and -CommandLine is used #103

Closed Robert-LTH closed 3 years ago

Robert-LTH commented 3 years ago

When using Install-Softwarepackage along with -CommandLine and a space in the filename the script waits forever because the path isnt contained inside ": https://github.com/AutomatedLab/AutomatedLab.Common/blob/3b21eb0bffd04c5df2342bbde0d9711622c8da27/AutomatedLab.Common/Common/Public/Install-SoftwarePackage.ps1#L88

but if -CommandLine is skipped it works as expected: https://github.com/AutomatedLab/AutomatedLab.Common/blob/3b21eb0bffd04c5df2342bbde0d9711622c8da27/AutomatedLab.Common/Common/Public/Install-SoftwarePackage.ps1#L81

I believe that '/I {0} {1}' should change to '/I "{0}" {1}' but I just started using AutomatedLab and I might have missed something obvious.

raandree commented 3 years ago

Thanks for reporting this, @Robert-LTH. Fix is on the way.

Robert-LTH commented 3 years ago

AutomatedLab helps me ALOT and is an awsome tool and I'm glad I could give something back!