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
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?
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." }
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?
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/
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
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
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
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
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 :) th-cam.com/video/VY-agDJjarA/w-d-xo.html
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.
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
@@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
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...
Thanks again for this John! Another great Intune / Win32 app packaging tutorial + troubleshooting tips!
Thanks a lot @MEMO MMANA
Looking forward for the next 2 videos in this series. Wise change of channel name. Thank you :)
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
Thank you ! Really wanted a step by step guide will watch this later and try it on my homelab
Thanks, two more videos will follow this one, already recorded but need some edits, hope to have them out before Sunday at least.
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?
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."
}
Really very nice videos
Thank you so much Ashwini!
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?
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/
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
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
@@IntuneVitaDoctrina Thanks for reply.
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
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
Why not use something like PSAppDeployToolkit?
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 :)
th-cam.com/video/VY-agDJjarA/w-d-xo.html
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.
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
@@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
Do you recommend deploying with win32 or msi?
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...