Hi,
Using the new version 4.1
I am trying to apply a msu file but can't seem to get the syntax for it
i tried these ;
Start-ADTProcess -FilePath "C:\Windows\System32\wusa.exe" -ArgumentList "$($adtSession.DirFiles)\windows11.0-kb5065431-x64_cfbf8bbd4938a7fb8a7aea5b3fc90e74e6bea6e4.msu /quiet /norestart"
Start-ADTProcess -FilePath 'c:\windows\system32\reg.exe' -ArgumentList 'import $($adtSession.DirFiles)\reg.reg'
Start-ADTProcess -FilePath "reg.exe" -Parameters "import "$dirSupportFiles\reg.reg"" -PassThru
So, by the looks of your code you have some confusion around which quotes to use
The first command looks fine as the -ArgumentList is all wrapped in a single pair of double quotes
In the 2nd command, you are using single quotes which are fine if they do not contain variables which you want to expand, but you do on the -ArgumentList ... so I'd suggest changing to the following:
[EDIT] The third command is incorrect, you have correctly escaped the extra pair of double quotes, but you are using -Parameters which is not a valid switch on Start-ADTProcess (See reference here: Start-ADTProcess · PSAppDeployToolkit).
I believe your second command should look like this: