PSAPPDep with DISM

//PSAPPDep with DISM
PSAPPDep with DISM2015-06-01T12:00:14+00:00

The Toolkit Forums General PSAPPDep with DISM

  • Author
    Posts
  • André
    Participant
    Post count: 9

    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é

    • This topic was modified 3 years, 1 month ago by  André.
  • Muhammad Mashwani
    Keymaster
    Post count: 118

    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.

  • tregelen
    Participant
    Post count: 4

    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

    • This reply was modified 3 years, 1 month ago by  tregelen.
  • André
    Participant
    Post count: 9

    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”

    • This reply was modified 3 years, 1 month ago by  André.

You must be logged in to reply to this topic.