Deploy RuckZuck Packages as Intune Win32Apps

Creating Intune Win32Apps is a time-consuming task as you have to collect a lot of information's for the import. This blog explains how to use packages from the RuckZuck Repository in Intune, as all the information you need is already there…

Package File

Intune requires to convert all binaries into a .intunewin "archive" file by using the IntuneWinAppUtil.exe. This means, every time a file does change, you have to repackage that app…

To automatically get the latest Version of a Product, we can use RZUpdate.exe, a tool to install RuckZuck packages from command-line. No need to recreate the .intunewin file anymore if the target application has changed...

Prepare a Folder

Download RZUpdate.exe into an empty Folder (c:\temp\rzupdate in this example)

create RZUpdate.intunewin

You can now use the IntuneWinAppUtil.exe to create a Package with nothing else than the RZUpdate.exe file.
As a result, we get a file RZUpdate.intunewin. This file can now be used for every application we want to install from the RuckZuck repository…

Add Win32 app in Intune

In the Intune console, add a new client app from type "Windows app (Win32)" and import the generated RZUpdate.intunewin file.

App information

Now, you have to decide which RuckZuck app you want to import..
If you browse the RuckZuck Repository you will see that RuckZuck is using a ShortName to identify a product. In this example, we are using the ShortName 7-Zip(MSI).

To get all the Information from RuckZuck, you can use the RuckZuck REST API with PowerShell.

Invoke-RestMethod -Uri "https://cdn.ruckzuck.tools/rest/v2/getsoftwares?shortname=7-Zip(MSI)"  

will return the full dataset:

ProductName    : 7-Zip 19.00 (x64 edition)  
Manufacturer   : Igor Pavlov  
Description    : 7-Zip is a file archiver with a high compression ratio for ZIP and GZIP formats, which is between 2  
                 to 10% better than its peers, depending on the exact data tested. And 7-Zip boosts its very own 7z
                 archive format that also offers a significantly higher compression ratio than its peers. up to 40%
                 higher!
ProductURL     : http://www.7-zip.org/  
ProductVersion : 19.00.00.0  
MSIProductID   : {23170F69-40C1-2702-1900-000001000000}  
Architecture   : X64  
PSUninstall    : $proc = (Start-Process -FilePath "msiexec.exe" -ArgumentList "/x  
                 {23170F69-40C1-2702-1900-000001000000} /qb! REBOOT=REALLYSUPPRESS" -Wait
                 -PassThru);$proc.WaitForExit();$ExitCode = $proc.ExitCode
PSDetection    : Test-Path 'HKLM:\SOFTWARE\Classes\Installer\Products\96F071321C0420729100000010000000'  
PSInstall      : $proc = (Start-Process -FilePath "msiexec.exe" -ArgumentList "/i `"7z1900-x64.msi`" /qn ALLUSERS=2  
                 REBOOT=REALLYSUPPRESS" -Wait -PassThru);$proc.WaitForExit();$ExitCode = $proc.ExitCode
PSPreReq       : [Environment]::Is64BitProcess  
PSPreInstall   : try { $proc  = (Start-Process -FilePath "$($Env:ProgramFiles)\7-Zip\Uninstall.exe" -ArgumentList "/S"  
                 -Wait -PassThru); } catch{};try { $proc  = (Start-Process -FilePath
                 "$(${env:ProgramFiles(x86)})\7-Zip\Uninstall.exe" -ArgumentList "/S" -Wait -PassThru); } catch{}
PSPostInstall  :  
ContentID      : e5184cc2-6373-4242-b3a0-ad7053e8b6a4  
Files          : {@{URL=https://7-zip.org/a/7z1900-x64.msi; FileName=7z1900-x64.msi;  
                 FileHash=70A45E89A75D16FCCB700A0E368EC541; HashType=MD5}}
Category       : Compression  
PreRequisites  : {}  
SWId           : 19053765  
IconHash       : 9qZUxGc2ukJWbm83ztdYZ135f  
IconURL        : https://ruckzuck.azurewebsites.net/rest/v2/geticon?iconhash=9qZUxGc2ukJWbm83ztdYZ135f  
ShortName      : 7-Zip(MSI)  

Now you can copy/paste all the required Information...
For the Logo, just browse to the IconURL,save the Image as .PNG and import that file in Intune.

Program

As we have packaged RZUpdate.exe, the Command-Syntax is RZUpdate.exe "{ShortName}" or RZUpdate.exe "{ProductName}" "{ProductVersion}" "{Manufacturer}" if you want to get a specific Version.

Note: use the ShortName if you always want to get the latest Version of the Product.

For the uninstall command, you have to translate the PSUninstall Property into a command.

Requirements

Specify the requirements for the Application:

Detection Rule

RuckZuck is using PowerShell to detect the Application (PSDetection Property). For complex detection rules it will make sense to use a "custom detection script" with the logic of PSDetection … But for simple MSI, File or Registry values, I would recommend to translate the logic from PSDetection… In this example it's an MSI, so I'm using the MSIProductID Property to detect the product code

Note: based on docs: If significant changes are made to a product then the product code should also be changed to reflect this. So the "MSI product version check" does only work if the ProductCode does not change… This feature does not make sense to me...?!

Return Codes

You can use the default return codes:

Done

You are ready, just assign the new App in Intune...
If you are missing an Application in RuckZuck , just create a Package...

Known Issues

  • RuckZuck Packages are not tested to run as SYSTEM Account, some may not work.. Please provide feedback on https://github.com/rzander/ruckzuck/issues if you detect such Packages...
  • Win32 Intune Apps running as User are not be able to start RZUpdate.exe (.NET CLR error)
  • RZUpdate is not using Deliver-Optimzation. Every client will get the full contet from the Internet (expect you are hosting an On-Prem RuckZuck-Server, to cache the files)