Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Minecraft Education Edition

I am trying to remotely install Minecraft Education Edition to several student computers. The download is a Zip file from microsoft. It contains a batch file that must run as admin and it checks the student laptop for admin rights and then runs a powershell command to install.

If I run it locally on the computer, it installs correctly. If I install it with PDQ Deploy, it shows successful but the app is not installed.

0

Comments

14 comments
Date Votes
  • I forgot to add that yes, I did unzip the file and created a folder and made a package in PDQ that runs the batch file and checked the box for include whole directory.

    0
  • Would you be willing to attach the scripts? It looks like I would need a .edu email address to download it from the site.

    0
  • @echo off

    echo Checking if you have Administrator permissions...

    net session >nul 2>&1
    if %errorLevel% == 0 (
    echo You have Administrator permissions, starting installer...
    pushd "%~dp0"
    PowerShell.exe -Command "& {Start-Process PowerShell.exe -ArgumentList '-NonInteractive -NoProfile -ExecutionPolicy Bypass -File Files\Install.ps1' -Verb RunAs}"
    echo Installation Complete
    exit
    ) else (
    echo Failure: Administrator permission is required to install. Please right click InstallMinecraftEducationEdition.bat and Select Run as Administrator...
    )

    pause >nul

    0
  • This is everything in the Batch file.

    0
  • Did you update the script to point to where you have Install.ps1 stored? What you posted is looking for Files\Install.ps1, which isn't going to find anything.

    0
  • Here is the READ ME text file that MS provides with the Zip file. It doesn't tell me to do any of that, so I don't think it is necessary:

     

    [Minecraft: Education Edition Installer]
    This folder contains an installation program (script) that will install Minecraft: Education Edition on this computer.
    Anyone with a Windows account on this computer will be able to use Minecraft: Education Edition.

    [Installation requirements]
    To install this app, you must have administrator privileges on this computer. The computer must be running Windows 10 (version 1511 or above.)

    [Installation instructions]
    1. Download the Minecraft installation file, named Minecraft Education Edition.zip.
    2. Find this zip file in the folder where you saved it (typically your Downloads folder.)
    3. Right-click on the file and select Extract all.
    4. Save the Minecraft Education Edition folder on a USB drive (USB thumb drive.)
    5. Use the USB drive to copy the folder to each Windows 10 computer where you want to install Minecraft: Education Edition. (You can copy the folder over the network, if you prefer.)
    6. Go to each Windows 10 computer, open the Minecraft Education Edition folder, right-click the InstallMinecraftEducationEdition.bat file and select Run as administrator.
    7. Wait while the installation program launches and checks to make sure your computer can run Minecraft: Education Edition. If your computer passes this test, the app will automatically install.
    8. Once installation is complete, restart each computer. Minecraft: Education Edition app is now ready to use by any student on each computer.


    [Potential reasons for Install Failures : Mitigation ]
    1. Some open Windows Apps may block installation : To fix this , you should restart the computer , close all windows apps and follow the install instructions above.
    2. You administrator may have set device policies or App blocker that blocks installation of apps : Contact your administrator to reset/relax these policies and follow the install instructions above.

    [Checking Windows Store updates : Best Practice]
    For best results, you should complete updates of other Windows Store apps on your computer before you install Minecraft Education Edition.
    Open the Windows Store app on your computer and click the Account button in the top right corner of your screen (next to Search).
    Click Download and updates, then click Check for updates, and install all available updates.

    [Running Minecraft: Education Edition]
    After Minecraft: Education Edition is installed, you can find the app in your Windows Start menu by typing Minecraft Education Edition.
    Minecraft: Education Edition will automatically install future app updates for itself, as long as you do not disable app updates for the Windows Store.

    0
  • There is a FILES folder in the main folder.

    0
  • Are you using the Push or Pull copy method? Did you specify the folder in "Additional Files" and check the "Include Entire Directory" box? If possible, please take a screenshot of the package.

    0
  • 0
  • It looks like you have your package configured correctly. Please post the contents of Install.ps1

    0
  • ######## Copyright Company="Microsoft Corporation" ########
    ######## Copyright (c) Microsoft Corporation. All rights reserved. ########

    <#
    .SYNOPSIS
    Script to deploy Minecraft: Education Edition V4

    .DESCRIPTION
    This script checks if Minecraft: Education Edition v4 already exists as a provisioned package and if not deploys Minecraft: Education Edition as provisioned package #
    In case provisioned package is present it checks if minecraft is present in current user profile and deploys if not #
    In case minecraft exists both as a provisioned package as well in the current user profile, script exits #
    #>

    param([string]$path = "")

    # Package Files and Package Names, these need to be updated for a new version #
    $mainpackageX64 = "Microsoft.MinecraftEducationEdition_0.142.0.0_x64__8wekyb3d8bbwe.Appx"
    $mainpackageX86 = "Microsoft.MinecraftEducationEdition_0.142.0.0_x86__8wekyb3d8bbwe.Appx"
    $packagenameX64 = "Microsoft.MinecraftEducationEdition_0.142.0.0_x64__8wekyb3d8bbwe"
    $packagenameX86 = "Microsoft.MinecraftEducationEdition_0.142.0.0_x86__8wekyb3d8bbwe"
    $deppackageX64_1 = "Microsoft.VCLibs.140.00_14.0.23816.0_x64__8wekyb3d8bbwe.Appx"
    $deppackageX64_2 = "Microsoft.NET.Native.Runtime.1.3_1.3.23901.0_x64__8wekyb3d8bbwe.Appx"
    $deppackageX64_3 = "Microsoft.NET.Native.Framework.1.3_1.3.23901.0_x64__8wekyb3d8bbwe.Appx"
    $deppackageX86_1 = "Microsoft.VCLibs.140.00_14.0.23816.0_x86__8wekyb3d8bbwe.Appx"
    $deppackageX86_2 = "Microsoft.NET.Native.Runtime.1.3_1.3.23901.0_x86__8wekyb3d8bbwe.Appx"
    $deppackageX86_3 = "Microsoft.NET.Native.Framework.1.3_1.3.23901.0_x86__8wekyb3d8bbwe.Appx"
    $licensefile = "Microsoft.MinecraftEducationEdition_8wekyb3d8bbwe_ad6a119f-978a-62c1-5f10-c017dde2343a.xml"

    $global:myLogText = ""
    $dir = Get-Location
    $opfile = Join-Path $dir "InstallResults.log"
    $dir = Join-Path $dir "\Files"
    $build = [System.Environment]::OSVersion.Version.Build
    $arch = $Env:Processor_Architecture;
    $pslog = $null;

    # Function to appends details to log and exit
    Function AppendLogAndExit
    {
    Param ([string] $msg, [string] $pslog, [string] $opfile, [bool] $writehost)
    AppendLog $msg $pslog $opfile $writehost
    Write-Host "Press any key to exit ..."
    $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
    Exit
    }

    # Function to appends details to log
    Function AppendLog
    {
    Param ([string] $msg, [string] $pslog, [string] $opfile, [bool] $writehost)
    $msg += "`r`n"
    if ($writehost)
    {
    Write-Host $msg
    }
    $global:myLogText += $pslog + $msg
    $global:myLogText | Out-File $opfile
    }

    Function CheckifProvisionedPackageExists
    {
    Param ([string] $packagename)
    $minecraftpackage = Get-AppxProvisionedPackage -Online | where {$_.PackageName -eq $packagename} | select -ExpandProperty PackageName
    # Builds lesser than 10586 do not support get-provisionedpackage and running as process hangs
    if ( ($minecraftpackage -eq $packagename) -or ( $build -lt 10586) )
    {
    return $true
    }
    else
    {
    return $false
    }
    }

    Function CheckifPackageExists
    {
    Param ([string] $packagename)
    $minecraftpackageforuser = Get-AppxPackage | where {$_.PackageFullName -eq $packagename} | select -ExpandProperty PackageFullName
    if ($minecraftpackageforuser -eq $packagename)
    {
    return $true
    }
    else
    {
    return $false
    }
    }

    Function RunDism
    {
    Param ([string] $arch)
    if ($arch -eq "amd64")
    {
    $args = "/Online /Add-ProvisionedAppxPackage /LogPath:`"{0}\dism.log`" /LogLevel:1 /PackagePath:`"{0}\{1}`" /DependencyPackagePath:`"{0}\{2}`" /DependencyPackagePath:`"{0}\{3}`" /DependencyPackagePath:`"{0}\{4}`" /DependencyPackagePath:`"{0}\{5}`" /DependencyPackagePath:`"{0}\{6}`" /DependencyPackagePath:`"{0}\{7}`" /LicensePath:`"{0}\{8}`"" -f $dir , $mainpackageX64, $deppackageX64_1, $deppackageX64_2, $deppackageX64_3, $deppackageX86_1, $deppackageX86_2, $deppackageX86_3, $licensefile
    }
    else
    {
    $args = "/Online /Add-ProvisionedAppxPackage /LogPath:`"{0}\dism.log`" /LogLevel:1 /PackagePath:`"{0}\{1}`" /DependencyPackagePath:`"{0}\{2}`" /DependencyPackagePath:`"{0}\{3}`" /DependencyPackagePath:`"{0}\{4}`" /LicensePath:`"{0}\{5}`"" -f $dir, $mainpackageX86, $deppackageX86_1, $deppackageX86_2, $deppackageX86_3, $licensefile
    }
    AppendLog $args $pslog $opfile $false
    $msg = "Installation has begun. This may take several minutes."
    AppendLog $msg $pslog $opfile $true
    $scriptpath = $MyInvocation.MyCommand.Path + " -path=" + $dir

    $pinfo = New-Object System.Diagnostics.ProcessStartInfo
    $pinfo.FileName = "Dism.exe"
    $pinfo.RedirectStandardError = $true
    $pinfo.RedirectStandardOutput = $true
    $pinfo.UseShellExecute = $false
    $pinfo.Arguments = $args
    $pinfo.Verb = "RunAs"
    $p = New-Object System.Diagnostics.Process
    $p.StartInfo = $pinfo
    $p.Start() | Out-Null
    #Do Other Stuff Here....
    $p.WaitForExit()
    $stdout = $p.StandardOutput.ReadToEnd()
    $stderr = $p.StandardError.ReadToEnd()
    AppendLog $stdout $pslog $opfile $true
    AppendLog $stderr $pslog $opfile $true
    if($p.ExitCode -eq 0)
    {
    AppendLog "Dism Completed Successfully" $pslog $opfile $false
    return $true
    }
    else
    {
    AppendLog "Dism Did Not Complete Successfully" $pslog $opfile $false
    return $false
    }
    }

    Function RunAddAppx
    {
    Param ([string] $arch)
    try{
    write-host "`n`n`n`n`n`n`n"
    $msg = "Installation has begun. This may take several minutes."
    AppendLog $msg $pslog $opfile $true
    if ($arch -eq "amd64")
    {
    Add-AppxPackage -Path $dir\$mainpackageX64 -DependencyPath $dir\$deppackageX64_1, $dir\$deppackageX64_2, $dir\$deppackageX64_3, $dir\$deppackageX86_1, $dir\$deppackageX86_2, $dir\$deppackageX86_3
    $cmd = "Add-AppxPackage -Path `"{0}\{1}`" -DependencyPath `"{0}\{2}`", `"{0}\{3}`", `"{0}\{4}`", `"{0}\{5}`", `"{0}\{6}`", `"{0}\{7}`"" -f $dir, $mainpackageX64, $deppackageX64_1, $deppackageX64_2, $deppackageX64_3, $deppackageX86_1, $deppackageX86_2, $deppackageX86_3
    AppendLog "Waiting for 30 seconds to ensure install is complete, Please wait." $pslog $opfile $true
    Start-Sleep -s 30
    $ret = CheckifPackageExists $packagenamex64
    }
    else
    {
    Add-AppxPackage -Path $dir\$mainpackageX86 -DependencyPath $dir\$deppackageX86_1, $dir\$deppackageX86_2, $dir\$deppackageX86_3
    $cmd = "Add-AppxPackage -Path `"{0}\{1}`" -DependencyPath `"{0}\{2}`", `"{0}\{3}`", `"{0}\{4}`"" -f $dir, $mainpackageX86, $deppackageX86_1, $deppackageX86_2, $deppackageX86_3
    AppendLog "Waiting for 30 seconds to ensure install is complete, Please wait." $pslog $opfile $true
    Start-Sleep -s 30
    $ret = CheckifPackageExists $packagenamex86
    }
    AppendLog $cmd $pslog $opfile $false
    if($ret)
    {
    return $true
    }
    else
    {
    AppendLog "Add Appx Failed" $pslog $opfile $false
    return $false
    }
    }
    catch
    {
    $errormessage = $_.Exception.Message
    AppendLog $errormessage $pslog $opfile $true
    return $false
    }
    }

    Function AppxLogParsing
    {
    Param ([string] $packagename)
    $events = Get-WinEvent -LogName Microsoft-Windows-AppXDeploymentServer/Operational -MaxEvents 1000 | Where-Object { ($_.LevelDisplayName -eq "error") -and ($_.Message -like "*$packagename*")} | Select -ExpandProperty Message
    if($events)
    {
    AppendLog "------------------- AppxDeployment Error event logs Start ----------------------" $pslog $opfile $false
    AppendLog $events $pslog $opfile $false
    AppendLog "------------------- AppxDeployment Error event logs End ----------------------" $pslog $opfile $false
    }
    else
    {
    AppendLog "No Appx Error Logs Found" $pslog $opfile $false
    }
    }

    # Checks provisioned and app package installs.
    # Returns 0 if both are good
    # Returns 1 if provisioned package looks good but add package fails
    # Returns 2 if add package looks good but provisioned package fails
    # Returns 3 if both failed
    Function CheckInstall
    {
    Param ([string] $packagename)
    $msg = "Checking appx install"
    AppendLog $msg $pslog $opfile $false
    if (CheckifPackageExists $packagename)
    {
    $msg = "Appx install success, validated"
    AppendLog $msg $pslog $opfile $false
    }
    else
    {
    $msg = "Appx install failed, collecting logs"
    AppendLog $msg $pslog $opfile $false
    AppxLogParsing $packagename
    }

    $msg = "Checking provisioned package install"
    AppendLog $msg $pslog $opfile $false
    if (CheckifProvisionedPackageExists $packagename)
    {
    $msg = "Provisioned Package install success, validated"
    AppendLog $msg $pslog $opfile $false
    }
    else
    {
    $msg = "Provisioned Package install Failed"
    AppendLog $msg $pslog $opfile $false
    AppxLogParsing $packagename
    }
    }

    try
    {
    # Enterprise components are supported only after build 10240
    if( $build -lt 10240)
    {
    $msg = "This app cannot be installed on this version of Windows. It requires Windows 10 (version 1511 or above.)"
    AppendLogAndExit $msg $pslog $opfile $true
    }
    else
    {
    $msg = "{0} OS Version is supported, Proceeding to Install" -f $build
    AppendLog $msg $pslog $opfile $false
    if ($arch -eq "amd64")
    {
    $msg = "{0} Architecture is supported, Proceeding to Install" -f $arch
    AppendLog $msg $pslog $opfile $false

    $pexists = CheckifPackageExists $packagenameX64
    if ($pexists)
    {
    $msg = "App package exists, proceeding to add provisionedpackage"
    AppendLog $msg $pslog $opfile $false
    }
    else
    {
    $msg = "App package does not exist, proceeding to add"
    AppendLog $msg $pslog $opfile $false
    if(RunAddAppx $arch)
    {
    $msg = "Minecraft: Education Edition has been installed on this windows account, We will try to install on all other accounts next"
    AppendLog $msg $pslog $opfile $true
    }
    else
    {
    $msg = "Minecraft: Education Edition failed to install on this windows account. `r`nWe will now retry the installation."
    AppendLog $msg $pslog $opfile $true
    }
    }

    $ppexists = CheckifProvisionedPackageExists $packagenameX64
    if ($ppexists -and $build -ge 10586)
    {
    $msg = "Provisioned package already exists"
    AppendLog $msg $pslog $opfile $false
    $msg = "We skipped installation because looks like Minecraft: Education Edition Provisioning Package is already on your device."
    AppendLog $msg $pslog $opfile $true
    }
    else
    {
    $msg = "Provisioned package does not exist, proceeding to add"
    AppendLog $msg $pslog $opfile $false
    if(RunDism $arch)
    {
    $msg = "Minecraft: Education Edition has been installed for all windows accounts on this Computer. `r`nFor best results, Please restart and verify there are no pending app updates in the Windows Store."
    AppendLog $msg $pslog $opfile $true
    }
    else
    {
    $msg = "Minecraft: Education Edition Failed to install for the following possible reasons: `r`nSome Open Applications may block install, Please restart the computer, Close all applications and Try again. `r`nFor best results, Please Verify there are no pending app updates in the Windows Store.`r`nYour Administrator may have set policies to block installations, Please contact your Administrator."
    AppendLog $msg $pslog $opfile $true
    }
    }
    CheckInstall $packagenameX64
    }
    elseif ($arch -eq "x86")
    {
    $msg = "{0} Architecture is supported, Proceeding to Install" -f $arch
    AppendLog $msg $pslog $opfile $false

    $pexists = CheckifPackageExists $packagenameX86
    if ($pexists)
    {
    $msg = "App package exists, proceeding to add provisionedpackage"
    AppendLog $msg $pslog $opfile $false
    }
    else
    {
    $msg = "App package does not exist, proceeding to add"
    AppendLog $msg $pslog $opfile $false
    if(RunAddAppx $arch)
    {
    $msg = "Minecraft: Education Edition has been installed on this windows account, We will try to install on all other accounts next"
    AppendLog $msg $pslog $opfile $true
    }
    else
    {
    $msg = "Minecraft: Education Edition failed to install on this windows account. `r`nWe will now retry the installation."
    AppendLog $msg $pslog $opfile $false
    }
    }

    $ppexists = CheckifProvisionedPackageExists $packagenameX86
    if ($ppexists -and $build -ge 10586)
    {
    $msg = "Provisioned package already exists, proceeding to check and install for user profile"
    AppendLog $msg $pslog $opfile $false
    $msg = "We skipped installation because looks like Minecraft: Education Edition Provisioning Package is already on your device."
    AppendLog $msg $pslog $opfile $true
    }
    else
    {
    $msg = "Provisioned package does not exist, proceeding to add"
    AppendLog $msg $pslog $opfile $false
    if(RunDism $arch)
    {
    $msg = "Minecraft: Education Edition has been installed for all windows accounts on this Computer. `r`nFor best results, Please restart and verify there are no pending app updates in the Windows Store."
    AppendLog $msg $pslog $opfile $true
    }
    else
    {
    $msg = "Minecraft: Education Edition Failed to install for the following possible reasons: `r`nSome Open Applications may block install, Please restart the computer, Close all applications and Try again. `r`nFor best results, Please Verify there are no pending app updates in the Windows Store.`r`nYour Administrator may have set policies to block installations, Please contact your Administrator."
    AppendLog $msg $pslog $opfile $true
    }
    }
    CheckInstall $packagenameX86
    }
    # Not supported on other architectures
    else
    {
    $msg = 'This app cannot be installed on a computer with this microprocessor.' -f $arch
    AppendLogAndExit $msg $pslog $opfile $true
    }
    }
    $msg = "Script has completed execution, exiting"
    AppendLogAndExit $msg $pslog $opfile $false
    }
    catch
    {
    # A Number of operations performed below require elevation, exiting if not admin or if other issues are encountered
    $errormessage = $_.Exception.Message
    AppendLogAndExit $errormessage $pslog $opfile $true
    }

     

    0
  • Wow, that is a wild PowerShell file. I can't believe people actually write scripts without indentation. It's painful to read.

     

    1. Are you deploying the package as the same user you used to install it manually?
    2. Are you rebooting the target after installation?

     

    Try changing line 31 of Install.ps1 to:

    $opfile = Join-Path $dir "Output.log"

    In theory this will cause PDQ to grab it.

    0
  • good tips

    0
  • Downloaded MinecraftEducationEdition_x86.1.12.0.0.exe and put /qn in PDQ deploy and it worked for me. 

    0