Standard Users - Install Updates

Standard Users - Install Updates

it
Explorer Explorer
7,850 Views
24 Replies
Message 1 of 25

Standard Users - Install Updates

it
Explorer
Explorer

I'm guessing this has come up a million times, but searching hasn't led me very far. How can we either push or allow standard user's (no administrative privileges) to install their Autodesk updates? This becomes burdensome for the user and IT as these updates are released so frequently. How are all you handling?

0 Likes
7,851 Views
24 Replies
Replies (24)
Message 21 of 25

Anonymous
Not applicable

Hi Darius, may I point out an observation when running your script please?  I notice that if a downloads folder is entered then it picks up just about everything that is in the folder whereas by only considering files signed by Autodesk, this would target just the relevant installer files.

We too use a similar approach in that our script runs as an SCCM Package/Program but it detects the logged on user and searches that location for any files that have been signed by Autodesk and then presents the available files in a GridView window allowing the user to multi-select which files to install.

The selected files are then executed using different command line options based on the file extension.

I'm hoping to convert the script to a C# app at some stage so if there are any C# developers looking to collaborate on such a project, let me know.

Cheers.

0 Likes
Message 22 of 25

darius.petersonii
Explorer
Explorer

1. Thank you for using my script

 

2. Yes, I'm aware. That's why this thing only runs .msp files. This way the following criteria has to be met before installing:

 

   - The software that needs to be updated has to be installed on the users machine

   - The installed version has to correlate with the .msp being installed (for example, update 5.2.3 can't be installed on 4.2.7 without installing tye major version of 5.0.0)

 - Digital signatures have to match. An .msp with the wrong digital signature will be blocked by windows smartscreen

 

This is as "safe" as I can make it

 

3. This is the most important--I am currently developing a few features along the lines of what you are doing. I plan to keep mine in powershell so I can roll it out faster to "security conscious" networks. Please note that if you sell something along these lines in the future, we may end up in court

 

...and I would much rather not do that. So how about we team up to make this an open source solution (I will write it in PowerShell 7, you can do C#) and we make it free for everyone?

Message 23 of 25

Anonymous
Not applicable
Information Classification: CONTROLLED

Hi Darius,
Thanks for getting in touch. I'm still in discussions with my colleagues about how they want to progress the ability for users to update their Autodesk programs. It really is a shame that Autodesk don't seem to be willing to come up with a centrally managed solution at this time that would save everyone from such frustration.
We currently use ADA to detect and download what is available based on the installed product so our powershell method works for us as we have to install installer.exe, update .exe, msi and .msp files in order to stay current. Cyber Security aren't always in agreement of course so for now, we only use this method to ensure that newly built machines have the latest updates installed.
I was hoping that a C# developer would step up as that is certainly not my area of expertise but if I get to the point where I feel that I do get code working, I'll post it. I'm only on contract here and that finishes next week so I may not get the chance to develop it much further at this moment in time.
Cheers,
Rob.
0 Likes
Message 24 of 25

darius.petersonii
Explorer
Explorer

doesn't mean you and I can't work together!

 

mine has logic to extract the msp from those .exe files--I found that most of those files are just wrapped .msp's

 

Plus i like your out-grid view idea. a few Xaml screens and you and I will have a pretty cool idea.

 

email me...lets work. I have a buddy with an SCCM blog. getting published for something this cool keeps employers calling lol 

0 Likes
Message 25 of 25

Simon_Weel
Mentor
Mentor

It's an old topic, but hey, so am I 🙂

We use the Domain Shutdown script to install all kinds of updates. The Shutdown script is, as the name implies, executed if you shut down your Windows (domain) computer. It's a simple .cmd script, so it's a bit 'how you do it'. With Powershell, it's probably much easier / powerful, I guess, but I don't master Powershell.

 

Edit: The Shutdown script is executed under the System account, which has permission to install stuff.

 

Let's have a look at the part installing Revit updates. I made a sub-routine that is CALLed to check the build number of the currently installed Revit version:

 

 

:versieno

rem Routine with max. 3 arguments:
rem		1 - path + filename
rem 	2 - build number - used below as 'regular expression' to get an exact search result.
rem		3 - if not empty AND build number is incorrect, send a message.
rem Build number can be found in the release notes or by executing the command below:
rem wmic datafile where name='<path_to_executable>\<name_of_executable>' get version /format:list

if (%1)==() EXIT /B
set update=0
set temppath=%1
if not exist %temppath:\\=\% goto path_error
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 "%capps%Scripts\e-mail.cmd" "Problem with Revit update %computername%" %3 "")) >nul
set temppath=
EXIT /B

:path_error
set temppath=%~1
call "%capps%Scripts\e-mail.cmd" "Problem with Revit update %computername%" "Cannot find the path specified: %temppath:\\=\%" ""
set temppath=
EXIT /B

 

 

 

If there's a problem, it calls another script, sending an e-mail to me.

 

Now the part for installing, for example, Revit 2021 update 1.

 

 

rem = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
rem = =                                                                   = =
rem = =              Revit 2021                                           = =
rem = =                                                                   = =
rem = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

echo:
echo ---------------------------------------------------------------
echo Revit 2021

rem Paths for updates
set source_path=<path_to_deployment>Autodesk\2021\Revit\Updates\
set target_path=c:\program files\Autodesk\Revit 2021\
set programm=Revit.exe

if not exist "%source_path%*.*" goto Revit_2021_end
if not exist "%target_path%*.*" goto Revit_2021_end

:Revit_2021_Update_01

rem Check if the build number is correct. If not, perform update.
rem If after installing the update, the build number is still incorrect, send a message.

set build_number="21.1.40.95"

call :versieno "%target_path:\=\\%%programm%" %build_number%

if not %update%==1 goto Revit_2021_Update_02

echo Install Update 1.4...
Start "" /B /wait "%source_path%Revit_2021_1_4.exe" /passive

call :versieno "%target_path:\=\\%%programm%" %build_number% "Problem with Revit 2021 update 1.4 - build number %versie:"=% incorrect."

:Revit_2021_Update_02
rem Some more stuff to install
:Revit_2021_end

 

It's rather simple. You have to specify the preferred build number, which is then compared with the build number of the installed program. If they differ, install the update. And if the still differ after the update is installed, send a message. If the build number is already up-to-date, skip to the end of the section.

 

Some weird stuff is needed to strip / add double backslashes: \=\\