andre
June 1, 2015, 11:58am
1
Hi there,
i would like use following line into PSAPPDEP but my syntax is wrong and i don´t know what the right one is.
Execute-Process -Path '$envWinDir\System32\DISM.exe' -Parameters "/Online /Add-ProvisionedAppxPackage /PackagePath:"$dirFiles\Microsoft.SurfaceHub_2015.206.1.3943_neutral_~_8wekyb3d8bbwe.appxbundle" /LicensePath:"$dirFiles\Microsoft.SurfaceHub_8wekyb3d8bbwe.xml" -PassThru
thanks a lot.
andré
Use double quotes instead of single quotes around variable names. Single quote means that the text should be treated as a text literal. Double quotes tells the PowerShell interpreter to expand variables.
I use the backtick ` escape character when I need to use quotes.
Execute-Process -Path '$envWinDir\System32\DISM.exe' -Parameters "/Online /Add-ProvisionedAppxPackage /PackagePath:`"$dirFiles\Microsoft.SurfaceHub_2015.206.1.3943_neutral_~_8wekyb3d8bbwe.appxbundle`" /LicensePath:`"$dirFiles\Microsoft.SurfaceHub_8wekyb3d8bbwe.xml`" -PassThru
andre
June 8, 2015, 6:37am
4
Ahh, thank you very well.
this was the hint i´m looking for.
i solved this so but your way is shorter.
$DISM = $env:WinDir + ‘\System32\DISM.exe’
$POWERSHELL = $env:WinDir + ‘\System32\WindowsPowershell\v1.0\powershell.exe’
$PACKAGE = $dirfiles + ‘\Microsoft.SurfaceHub_2015.516.56.635_neutral_~_8wekyb3d8bbwe.appxbundle’
$LICENSE = $dirFiles + ‘\Microsoft.SurfaceHub_8wekyb3d8bbwe.xml’
Execute-Process -Path $DISM -Parameters “/Online /AddProvisionedAppxPackage /PackagePath:$PACKAGE /LicensePath:$LICENSE”