Installing NAV 2018 client via Intune

Eric 96 Reputation points
2020-11-17T16:05:19.223+00:00

I have used the Win32 Content Prep Tool to capture and upload the NAV client install to Intune. Before doing so I validated that the install via command line works and runs silently on several PCs. After assigning the app in Intune it shows up on PCs. When selecting the app from the Company Portal to install it fails. Checking the IntuneManagementExtension.log shows that it downloads the ZIP file (also verified by seeing it in C:\Program Files (x86)\Microsoft Intune Management Extension\Content\Incoming). It also moves it to the staging folder. But when it tries to extract the zip it gets the below error message in the log and the install reports as failed. Tried on multiple PCs with the same error. I have been unable to find any references to this error. I have also tested manually unzipping the downloaded zip file from the Staging folder to the C:\Windows\IMECache folder it it unzips without error. There is no AV software running other than the built-in Windows Defender with default settings. Computer is not domain joined but is Azure AD joined. There are no policies setup to the PCs as this is a brand new environment.

UnauthorizedAccessException occurs when unzipping Win32App user session 1, the exception is System.UnauthorizedAccessException: Access to the path 'C:\Program Files (x86)\Microsoft Intune Management Extension\Content\Staging\1d739ef8-0eae-41ba-97c5-1b9182b6dead_1\1d739ef8-0eae-41ba-97c5-1b9182b6dead_1.zip' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.Compression.ZipFile.Open(String archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding)
at System.IO.Compression.ZipFile.ExtractToDirectory(String sourceArchiveFileName, String destinationDirectoryName, Encoding entryNameEncoding)
at Microsoft.Management.Services.IntuneWindowsAgent.AgentCommon.FileSystemWrapper.ExtractZipFileToDirectory(String sourceArchiveFileName, String destinationDirectoryName)
at Microsoft.Management.Clients.IntuneManagementExtension.Win32AppPlugIn.ContentUnzipper.Unzip(SideCarApplicationClientPolicy sideCarApplicationClientPolicy, Int32 sessionId, String downloadFilePath, Win32AppResult win32AppResult, String& unzipFolder)

Microsoft Intune Application management
Microsoft Intune Application management
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Application management: The process of creating, configuring, managing, and monitoring applications.
894 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,482 questions
{count} votes

Accepted answer
  1. Eric 96 Reputation points
    2020-11-18T20:11:18.893+00:00

    To be clear my package is not in a zip file. The zip file in those logs is from Intune itself compressing the install into a zip file and downloading it to the PC. So I don't think your solution will do anything as Intune will still do the same steps as part of how it internally manages application downloads.

    I was however able to resolve this issue by deleting the application from Intune and adding it again using the exact same settings and files as before. So there must be some weird glitch that can corrupt files as part of uploading them to Intune. Hopefully logging this error message will help someone else out there and they can just delete/recreate everything to fix it.


1 additional answer

Sort by: Most helpful
  1. Crystal-MSFT 44,411 Reputation points Microsoft Vendor
    2020-11-18T03:38:36.327+00:00

    @Eric , From the information provided, I know the NAV 2018 is failed to deploy via Intune. The error is unzipping denied. If there's any misunderstanding, feel free to let us know.

    For our issue, as a workaround, maybe we can zip all file before wrapped as Win32 app. Then deploy to device, and use batch file to unzip it.

    The batch file can be simian as below:

    @echo off   
      
    ::this part will unzip files   
      
    powershell.exe -command "Expand-Archive -Force '%~dp0NAV.zip' '%~dp0'"  
      
    setup.exe –silent  
    

    Hope it can help.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments