Revit Deployment Time

It’s that joyous time of year again! The time when the “first” service pack comes out for my favorite design software and I start thinking about deployments!

I wrote a very detailed deployment article some years back, and most of it still fits, however I have been able to tweak the code slightly. Here is a quick overview of what we found to be most effective:

Since we are in a domain setting and our users don’t have admin rights, we removed the UAC for workstations through a GPO.

A fantastic tip from the outstanding blog Up and Ready helped me track down the individual software packages for the Suites that we have. I like having an individual deployment for each piece of software, so I can give User A Revit and AutoCrap, but I can give User B Revit and Max, and then give User C only Navisworks. When you create a deployment from the Suite, you can specify only one piece of software, but the package that gets created is HUGE and has a lot of extra crap. Fortunately, you can use your Suite license on each individual software that the Suite includes. So, download the individual software package and create deployments from those to save space.

I then use the Autodesk utilities to create a deployment, after tweaking our Revit.ini file. This is much better than years ago. It’s clean and the importing of the Revit.ini is really nice. It’s a tad annoying that I have to install “vanilla” Revit first, edit my options, and then track down the Revit.ini file to use, but it’s not horrible, and it works. Possibly it would be better to have a utility that only creates a Revit.ini file with no Revit; some wizard-y thing. Eh.

Again, I am using the remarkable AutoIT script editor to create two “wrapper” files: one we call “net” and one “local”. If you do some IT, this utility is gold. Get it. Now.

The “net” wrapper gets assigned through a GPO to a scheduled task that kicks off whenever someone logs in to the appropriate PC. “Net” will check to see if a little .txt file exists on the C: drive. If it doesn’t, then it goes and copies “local” to the C: drive and runs it. A little note about the text file: it’s here to see if the installer has run. We could check to see if the Revit.exe exists, but this way I can copy the .txt file to individual PCs that we may happen to want to skip this install, but not put in their own OU.

“Local” wrapper has all the info from the installer shortcut created by the deployment. Its main job is to pretend it is a user with admin rights, then run the install. Once it is finished, it write the .txt file to the PC to say “Hey! I’m done!”

We have had a high rate of success with this method. It allows us to deploy a nice tweaked version of Revit and not spend too much time messing with it. If you would like to get a copy of our “net” and “local” files, fee free to take a look below.

NET

Local $TxtFileNameLocal
Local $TxtFileName2
Local $LauncherFilePath
Local $LauncherFileName
Local $LocPath
Local $LocLauncher
Local $MSoftPath

;create the place to keep the local file – will skip if path already exists
DirCreate(“LOCAL WRITABLE PATH TO SAVE THE LOCAL FILE”)
$MSoftPath = “LOCAL DRIVE LOCATION TO STORE TEXT FILES”
$LauncherFilePath = “NETWORK PATH TO LOCAL WRAPPER FILE”
$LocPath = “LOCAL DRIVE LOCATION TO STORE LOCAL WRAPPER FILE”

; the file that gets written after installer runs so it doesn’t run again
$TxtFileName = “REVIT_15.txt”

; local wrapper name
$LauncherFileName = “rvt15-local.exe”

; checks if the text file exists
If FileExists($MSoftPath & $TxtFileName) Then
;text file exists, so nothing to do
Else
; no text file – rock on
$LocLauncher = $LocPath & “\” & $LauncherFileName

; copy the local file down
FileCopy($LauncherFilePath & $LauncherFileName, $LocLauncher)

; run the local file with admin rights
RunAs(“ADMIN”, “DOMAIN”, “PASSWORD”, 1, $LocLauncher)

EndIf

Local

#RequireAdmin
; text file to create after installer attempts to run
Local $TxtFileName
$TxtFileName = “LOCAL DRIVE LOCATION TO STORE TEXT FILES\REVIT_15.txt”

; warm up the network
DriveMapAdd(“”, “UNC PATH TO DEPLOYMENT”)

;setup.exe and the deployment ini file can be copied from the shortcut
;that gets created with the deployment
;as can the arguments – below are what I get from mine
Local $ProgramFile, $argFile, $command

$ProgramFile = FileGetShortName(“PATH TO DEPLOYMENT\Setup.exe”)
$argFile = FileGetShortName(“PATH TO DEPLOYMENT\RVT2015.ini”)
$command = $ProgramFile & ” /qb /I ” & $argFile & ” /language en-us”

;this is the actual installer
RunWait($command);MsgBox(1, “Title”, $ProgramFile)

;write the text file – note that the file gets written even if the installer fails
;this is so the PC doesn’t keep trying to install again and again – track down the issue
FileOpen($TxtFileName, 1)
FileWriteLine($TxtFileName, “Revit 2015 Installed”)
FileClose($TxtFileName)

Enjoy! Hope this makes your installations a little happier!

Advertisements