Intune Win32 App Troubleshooting - Create 7-Zip package (1/3)

Поділитися
Вставка
  • Опубліковано 8 жов 2024
  • In this first video of three, we create a #win32 app #7zip package.
    By purpose, we create some problems so we will get some logs files to look at in the following videos.
    Working PowerShell Script to install 7-Zip 22.01 x64
    Install 7-Zip 22.01 64-bit
    John Bryntze 26th September 2022
    Variable
    $JBNLogs = "c:\programdata\JBNLogs"
    $JBNScriptRoot = Split-Path -Path $MyInvocation.MyCommand.Path
    $JBNInstallFile = "$JBNScriptRoot\7z2201-x64.msi"
    $JBNArguments = "/qn /l $JBNLogs\Install-7Zip22.01x64.log /norestart"
    check if log folder exists
    if(!(test-path $JBNLogs))
    {
    new-item -ItemType Directory -Path $JBNLogs -Force
    }
    Install 7-Zip
    Start-Process -FilePath $JBNInstallFile -ArgumentList $JBNArguments -wait
    Links:
    7-Zip Download www.7-zip.org/...
    Microsoft Win32 Content Prep Tool (to create the .intunewin file) github.com/Mic...
    Playlist: • Intune - Win32 App Tro...

КОМЕНТАРІ • 24

  • @3143iamsam
    @3143iamsam 2 роки тому +2

    Thanks again for this John! Another great Intune / Win32 app packaging tutorial + troubleshooting tips!

  • @HeyRadu
    @HeyRadu 2 роки тому +2

    Looking forward for the next 2 videos in this series. Wise change of channel name. Thank you :)

    • @IntuneVitaDoctrina
      @IntuneVitaDoctrina  2 роки тому +2

      Thanks a lot Radu, thought I would have second video out today, but got a crashed computer taking most of my time, will see later today or during weekend for sure :) and yes the previous name of the channel was stupid so any name was better hahaha :) that is good when the bar is set low, you can only do better hahaha

  • @XwolfBane18
    @XwolfBane18 2 роки тому +1

    Thank you ! Really wanted a step by step guide will watch this later and try it on my homelab

    • @IntuneVitaDoctrina
      @IntuneVitaDoctrina  2 роки тому +1

      Thanks, two more videos will follow this one, already recorded but need some edits, hope to have them out before Sunday at least.

  • @gamalelshabrawy1810
    @gamalelshabrawy1810 2 місяці тому +1

    Thanks great work, :) I will follow all the previous courses
    What should I change in the script if I would like to uninstall the old version first, and then install the newer version?

    • @IntuneVitaDoctrina
      @IntuneVitaDoctrina  2 місяці тому

      Thanks, if you follow all my videos and learn you will be a hero at work for sure :)
      If you want to uninstall a version first, I'm in a few days releasing a video on exactly that, but here is one way, you add in these rows before to uninstall the software (this works with all MSI installed apps, not all EXE, but for 7-zip it will work, as I mentioned a video be soon release for that.
      #2. PowerShell WMI uninstall
      # Define the substring of the application name to uninstall
      $appSubstring = " 7-Zip"
      # Get the WMI objects for all installed applications
      $apps = Get-WmiObject -Query "SELECT * FROM Win32_Product"
      # Filter the applications to find those that contain the specified substring
      $matchingApps = $apps | Where-Object { $_.Name -like "$appSubstring*" }
      # Check if any matching applications were found
      if ($matchingApps) {
      foreach ($app in $matchingApps) {
      # Uninstall each matching application
      Write-Host "Uninstalling $($app.Name)..."
      $result = $app.Uninstall()
      # Check if the uninstallation was successful
      if ($result.ReturnValue -eq 0) {
      Write-Host "$($app.Name) has been successfully uninstalled."
      } else {
      Write-Host "Failed to uninstall $($app.Name). Return value: $($result.ReturnValue)"
      }
      }
      } else {
      Write-Host "No applications matching '$appSubstring' were found on this machine."
      }

  • @SeanSarvadi
    @SeanSarvadi 7 місяців тому +1

    Thank you for this. Is there a way we can set this 7-Zip as the default application once installed on the user's device, maybe a need for PowerShell script or a configuration profile?

    • @IntuneVitaDoctrina
      @IntuneVitaDoctrina  7 місяців тому

      Thanks Sean, that is a very good question, and could be a future video. I have done it and it has worked good but then later needed to change and the setting has caused minor issues but works good. In general it is pretty difficult because Microsoft know from old time if the vendor decide during install, it takes over ALL possible file extensions LOL :)
      Your suggestion Configuration Profile works, by using an OMA-URI named ApplicationDefaults/DefaultAssociationsConfiguration
      It is a few steps to make it happen, but doable, this blog post (not written by me) explains it very well:
      cloudinfra.net/how-to-configure-default-apps-on-windows-using-intune/

  • @ashwinikumarsccm307
    @ashwinikumarsccm307 Рік тому +1

    Really very nice videos

  • @sunilpal7933
    @sunilpal7933 Рік тому +2

    For available deployment, when we try to trigger installation from companybportal, it went to "your device is syncing and download will begin shortly." After sometime installation starts but sometimes it is taking more time.Please suggest

    • @IntuneVitaDoctrina
      @IntuneVitaDoctrina  Рік тому

      Hi Sunil, sorry for late reply, was away for a week.
      I have noticed the same, checking the logs (got a video about that also) C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.log gives insight to what is happening.
      If it is a newly created Win32 and you test "too fast" it could be CDN (cloud storage) not replicated to the location of the device.
      There are some local device parameters also such as Internet Connection speed, if it is a larger package such as Adobe Suite.
      I prefer to check the IntuneManagementExtension.log as it has good details what it is actually doing and time stamps

    • @sunilpal7933
      @sunilpal7933 Рік тому +1

      @@IntuneVitaDoctrina Thanks for reply.

  • @vaigandlakiran
    @vaigandlakiran Рік тому +1

    Thanks for the video its was very useful. but i was able to follow the instructions and able to deploy 7 zip but now i see old and new version both in add and remove programs.

    • @IntuneVitaDoctrina
      @IntuneVitaDoctrina  Рік тому +1

      nice find, you are right,, and yes I recall seeing the same.
      The fix is to put uninstall command line first in the installer command so first uninstall the previous version before installing the new.
      if needed I can copy code here in comments what that would look like

    • @vaigandlakiran
      @vaigandlakiran Рік тому +1

      @@IntuneVitaDoctrina i have added below lines
      $oldVersionExePath = "C:\Program Files\7-Zip\Uninstall.exe" # Modify the path based on your old version installation
      if (Test-Path $oldVersionExePath) {
      $oldVersion = (Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object {$_.DisplayName -like "7-Zip*"}).DisplayVersion

  • @unkownuser2320
    @unkownuser2320 Рік тому +1

    if application is deployed as required and installation fails then it will retry automatically after intervals or requires any remediation script to re install those scenarios

    • @IntuneVitaDoctrina
      @IntuneVitaDoctrina  Рік тому

      It will retry after an interval, about 60 minutes, so if it was just "bad luck" it will install later, if it fails many times it will fail
      learn.microsoft.com/en-us/troubleshoot/mem/intune/app-management/develop-deliver-working-win32-app-via-intune

  • @osman_gedik
    @osman_gedik 3 місяці тому +1

    Do you recommend deploying with win32 or msi?

    • @IntuneVitaDoctrina
      @IntuneVitaDoctrina  3 місяці тому

      I always prefer Win32, and it is better to stay with only one format.
      Msi works, but you are limited in what you can do around it, such as run an extra line of script etc...

  • @QuintenMarais
    @QuintenMarais Рік тому +1

    Why not use something like PSAppDeployToolkit?

    • @IntuneVitaDoctrina
      @IntuneVitaDoctrina  Рік тому

      PS App Deployment Toolkit is great when you need user interaction, such as ask users to close a software before installation or ask for deferrals and so on, for simple installations I usually don't use PS App Deployment Toolkit.
      You can use it as standard for even silent installations, nothing wrong in that, makes the package little bigger but not much so not against it but not always needed I say.
      I have videos explaining PS App Deployment Toolkit in details, I'm a fan of it :)
      ua-cam.com/video/VY-agDJjarA/v-deo.html