I use several shutdown script, all called from the 'main' shutdown script. The main shutdown script is set using a GPO - something similar must be possible with Intune.
The shutdown script for Revit is a simple CMD script, this is a part of the script for Revit 2023 - it installs updates for Revit and also any Revit app.
@Anonymous off
echo:
echo Shutdown script Revit
rem *************************************************************************
rem *** ***
rem *** Shortcuts for different commands ***
rem *** ***
rem *************************************************************************
set client_apps=<DFS sharename>\ClientApps\
set common_path=<DFS sharename>\ClientApps\Revit\
set apps_source_path=%client_apps%Autodesk\Revit_Apps\
goto main
rem = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
rem = = = =
rem = = Sub Check version number = =
rem = = = =
rem = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
:version_no
rem Routine with a max. of 3 arguments:
rem 1 - UNC path + file name
rem 2 - version number - used below as 'regular expression' to perform exact search.
rem 3 - If not empty AND version number incorrect, send a message
rem The version number can be found on the Autodesk site or by executing this command:
rem wmic datafile where name='%target_path:\=\\%%program_name%' get version /format:list
if (%1)==() EXIT /B
set update=0
set temp_path=%1
wmic datafile where name=%1 get version | findstr /R "\<%2\>" >nul
if not (%errorlevel%)==(0) set update=1
if not (%update%)==(0) (if not [%3]==[] (call "%client_apps%Scripts\e-mail.cmd" "[Problem] Autodesk - Revit update %computername%" %3 "")) >nul
set temp_path=
EXIT /B
:path_error
set temp_path=%~1
call "%client_apps%Scripts\e-mail.cmd" "[Problem] Autodesk - Revit update %computername%" "The specified path not found: %temp_path:\\=\%" ""
set temp_path=
EXIT /B
:main
rem = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
rem = = = =
rem = = Test if pc needs a reboot = =
rem = = = =
rem = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
rem If both registry keys exist, then a reboot is pending.
rem Installing updates could be problematic.
set test=0
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" >nul 2>nul
if (%errorlevel%)==(0) set /a test=+1
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" >nul 2>nul
if (%errorlevel%)==(0) set /a test=+1
if %test%==2 goto end_script
rem ***********************************************************************
rem *** ***
rem *** Install Revit Updates. ***
rem *** ***
rem ***********************************************************************
rem = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
rem = = = =
rem = = Revit 2023 = =
rem = = = =
rem = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
echo:
echo ---------------------------------------------------------------
echo Revit 2023
rem Set update paths.
set source_path=%client_apps%Autodesk\2023\Revit\Updates\
set target_path=c:\program files\Autodesk\Revit 2023\
set program_datapath=%ProgramData%\Autodesk\RVT 2023\UserDataCache\
set program_name=Revit.exe
if not exist "%source_path%*.*" goto Revit_2023_einde
if not exist "%target_path%*.*" goto Revit_2023_einde
:Revit_2023_Update_01
rem Check version number - if incorrect, install update.
rem If after installing the version number is still incorrect, send a message.
set version="23.1.20.70"
set updateno=1.2
call :version_no "%target_path:\=\\%%program_name%" %version%
if not (%update%)==(1) goto Revit_2023_Update_02
echo Install Update %updateno%...
Start "" /B /wait "%source_path%Revit_2023_1_2.exe" -q
call :version_no "%target_path:\=\\%%program_name%" %version% "[Problem] Autodesk - Revit 2023 update %updateno% - version number %version:"=% komt niet overeen."
:Revit_2023_Update_02
rem = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
rem Revit 2023 apps
rem = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
echo:
echo ---------------------------------------------------------------
echo Revit 2023 apps
rem Set path for apps.
set source_path=%client_apps%Autodesk\2023\Revit\Apps\
set target_path=%ProgramData%\Autodesk\Revit\Addins\2023\
:Revit_2023_Apps_01
rem IFC Exporter
set target_path=%ProgramData%\Autodesk\ApplicationPlugins\IFC 2023.bundle\Contents\2023\
set program_name=Revit.IFC.Export.dll
set version="23.3.1.0"
rem Check version number - if incorrect, install update.
rem If after installing the version number is still incorrect, send a message.
call :version_no "%target_path:\=\\%%program_name%" %version%
if not (%update%)==(1) goto Revit_2023_Apps_02
echo Install IFCExporter %version:"=%
"%source_path%IFC.for.Revit.2023.3.1.0.msi" /passive
call :version_no "%target_path:\=\\%%program_name%" %version% "[Problem] Autodesk - IFCExporter 2023 - version number %version:"=% does not match."
:Revit_2023_Apps_02
:Revit_2023_einde
:Revit_2023_Shortcuts
if exist "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Autodesk\Revit 2023\*" rd /s /q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Autodesk\Revit 2023"
:end_script
echo:
echo ===============================================================
echo End Revit shutdown script
echo shutdown_revit script executed %date% on %time%>c:\shutdown_revit.txt
To figure out the version number of apps, you'll have to install them manually first and retrieve the version number 'by hand'. If you're familiar with Powershell, it's probably a lot easier to get things done....