pyRevit install on multiple computers

I am struggling to get pyRevit installed for a team environment via SCCM on Windows 11 Enterprise for Revit 2023-2025. Everyone runs with non-admin permissions.

I have read through all the documentation here: https://pyrevitlabs.notion.site/pyRevit-For-Teams-ddc6c312d6f6488691eed2ec7704fd97, but have found that the instructions appear to be outdated.

Here is my modified PowerShell script, figured out through trial and error:

### .NET 4.8 is already installed, so this step was omitted

# install pyRevit CLI 
### silent switches have changed from the original script
Write-Output "Installing pyRevit..."
Start-Process -FilePath ".\pyRevit_CLI_4.8.16.24121_admin_signed.exe" -Wait -ArgumentList "/VERYSILENT /NORESTART"

# set the environment path
### original script does not include the bin subfolder, which causes the pyRevit command to not be found
$env:Path = "C:\Program Files\pyRevit CLI\bin"

# pyRevit deploy root path 
### Setting this to "C:\Program Files\pyRevit" throws a permissions error
$pyrevitroot = "C:\pyRevit"

# pyRevit clone path
### new variable declared for later use
$pyrevitcloneroot = "C:\ProgramData\pyRevit"

# the name of the clone we are going to create 
### original script uses "ourmain", but if you don't use "master", it does not create the master clone
$cloneMaster = "master"

# pyrevit clone install path
$pyrevitcoredest = $(Join-Path $pyrevitroot $cloneMaster)

# pyRevit extension install path
$pyrevitexts = $(Join-Path $pyrevitroot "Extensions")

# confirms target path exists and is empty. removes existing if found
function Confirm-Path ([string] $targetpath) {
    Write-Output "Confirming $($targetpath)"
    If (Test-Path $targetpath) {
        Remove-Item -Path $targetpath -Recurse -Force
    }

    New-Item -ItemType Directory -Force -Path $targetpath > $null
}

# test whether a command exists in the environment
# Example: Test-CommandExists "pyrevit"
function Test-CommandExists {
    param ($command)
    $oldPreference = $ErrorActionPreference
    $ErrorActionPreference = 'stop'
    try {
        if(Get-Command $command){
            return $true
        }
    }
    catch {
        return $false
    }
    finally {
        $ErrorActionPreference=$oldPreference
    }
}

# clone pyRevit
function Clone-PyRevit() {
    # make sure paths exits and are clean
    Confirm-Path $pyrevitroot
    Confirm-Path $pyrevitexts

    # close all open Revits first
    Write-Output "Closing All Revits..."
    pyrevit revits killall

    # forget all previous pyRevit clones if any
    pyrevit clones forget $pyrevitclonename > $null

    # clone pyRevit now
    Write-Output "Cloning Core..."
    pyrevit clone $cloneMaster --dest=$pyrevitroot

    ### no extensions are needed in our environment, so the Cloning Extensions script is omitted

    # register the clone
    pyrevit clones add $cloneMaster $pyrevitcoredest
}

function Configure-PyRevit() {

    # make necessary config changes
    Write-Output "Configuring pyRevit..."
    pyrevit configs logs none
    pyrevit configs checkupdates disable
    pyrevit configs autoupdate disable
    pyrevit configs rocketmode enable
    pyrevit configs filelogging disable
    pyrevit configs loadbeta disable
    ### this line throws an error: pyrevit configs usagelogging disable

    ### original script is missing this line, which causes it to throw an error because the path is missing when seeding the config file
    Confirm-Path $pyrevitcloneroot

    # this final step is critical
    # this seeds the config file for all the future users
    pyrevit configs seed
}

function Attach-PyRevit() {
    Write-Output "Attaching pyRevit to Installed Revits..."
    pyrevit attach $cloneMaster default --installed --allusers
}

# orchestrate the installation
if (Test-CommandExists "pyrevit") {
    Clone-PyRevit
    Configure-PyRevit
    Attach-PyRevit
}

I have also tried running the PowerShell script manually on a fresh computer build using an admin account, with the same results.

Running this script causes it to:

  1. Silently install pyRevit CLI in C:\Program Files\pyRevit CLI
  2. Add C:\Program Files\pyRevit CLI\bin to the PATH environment variable
  3. Clone-PyRevit creates C:\pyRevit, then takes 5-10 minutes to populate C:\pyRevit\master, I assume because it is downloading from the GitHub repository
  4. Configure-PyRevit creates the pyRevit_config.ini file in C:\ProgramData\pyRevit with these values:
[environment]
clones = {"master":"C:\\pyRevit\\master"}
[core]
verbose = false
debug = false
checkupdates = false
autoupdate = false
rocketmode = true
filelogging = false
loadbeta = false
  1. Attach-PyRevit creates the pyRevit.addin file in C:\ProgramData\Autodesk\Revit\Addins\2023
    C:\ProgramData\Autodesk\Revit\Addins\2024, and C:\ProgramData\Autodesk\Revit\Addins\2025
    with the following content:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<RevitAddIns>
    <AddIn Type = "Application">
        <Name>PyRevitLoader</Name>
        <Assembly>C:\pyRevit\master\bin\engines\IPY2711PR\pyRevitLoader.dll</Assembly>
        <AddInId>B39107C3-A1D7-47F4-A5A1-532DDF6EDB5D</AddInId>
        <FullClassName>PyRevitLoader.PyRevitLoaderApplication</FullClassName>
        <VendorId>eirannejad</VendorId>
    </AddIn>
</RevitAddIns>

However, running any of those versions of Revit as the same signed in admin account does not display the pyRevit add-in on the Add-Ins tab.

Taking a look at this document: https://pyrevitlabs.notion.site/Installation-issues-f6495adb56254e9e8021f8a68e3b2ab7:

pyrevit attached returns:

==> Attachments
master | Product: "Autodesk Revit 2025" | Engine: DEFAULT (2711) | Path: "C:\pyRevit\master" | AllUsers
master | Product: "Autodesk Revit 2024" | Engine: DEFAULT (2711) | Path: "C:\pyRevit\master" | AllUsers
master | Product: "Autodesk Revit 2023" | Engine: DEFAULT (2711) | Path: "C:\pyRevit\master" | AllUsers

pyrevit clones returns:

==> Registered Clones (full git repos)
master | Branch: "master" | Version: "4.8.16:f9fa0d2" | Path: "C:\pyRevit\master"
==> Registered Clones (deployed from archive/image)

Checking to see if it is just the admin account, I signed out then back in again as a non-admin account. Opening any of those versions of Revit also does not display the pyRevit add-in on the Add-Ins tab.

Running the same commands signed in with a non-admin account on the same computer:

pyrevit attached returns:

==> Attachments
Unknown | Product: "Autodesk Revit 2025" | Manifest: "C:\ProgramData\Autodesk\Revit\Addins\2025\pyRevit.addin"
Unknown | Product: "Autodesk Revit 2024" | Manifest: "C:\ProgramData\Autodesk\Revit\Addins\2024\pyRevit.addin"
Unknown | Product: "Autodesk Revit 2023" | Manifest: "C:\ProgramData\Autodesk\Revit\Addins\2023\pyRevit.addin"

pyrevit clones returns:

==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)

Trying to manually fix the problem:
pyrevit clones add master “C:\pyRevit\master” returns:

Error: Path does not point to a valid clone "C:\pyRevit\master"
Run with "--debug" option to see debug messages

Can anyone point me in the right direction?

Hi @StephenJabs , welcome to the forum!
Im sorry if you encounter problems with the documentation, @Jean-Marc should be able to fix it now thanks to your suggestions.

While this doesn’t directly answer your question, let me ask one thing: do you want to use and customize your own clone for everybody? If not, you could solve everything by just downloading and running the full pyRevit installer instead of the pyrevit CLI.

If you just need to force some of the settings, you can feed your own pyrevit_config.ini file.

To your question: what do you see in the c:\pyrevit\master folder?

That version of pyRevit will work for 2023 and 2024, but 2025 requires the WIP installer. What version of Revit have you been checking in? does pyrevit work for 23-24 but not 25?

If 23-24 doesn’t work either:
For installation in enterprise environment, you might need to take some extra steps to get the correct permissions. I’m using Microsoft Intune which is basically just a batch script on the back end that points to my pyRevit installation batch script. This pyRevit batch script tries to elevate permissions and then execute a powershell script, which performs the actual installation.

How are you executing this powershell?

This is my batch script that calls the powershell script with the proper permissions (must be same folder as the powershell). All of the installers and scripts should ideally be in the same folder on the users C drive. We use Syncback to load RFA library so I just store there so the installer is included already with their daily sync.

Installation batch script
@ECHO OFF
@setlocal enableextensions
@cd /d "%~dp0"
set "scriptPath=%~dp0"
REM  --> Check for permissions
"%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system">nul 2>NUL

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    if exist "%temp%\getadmin.vbs" (
        del "%temp%\getadmin.vbs"
        echo Failed to acquire elevated privilege.  Try saving this script and running it from your Desktop.
        echo;
        echo Press any key to exit.
        pause>NUL
        goto :EOF
    )
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "%*", "", "runas", 1 >> "%temp%\getadmin.vbs"

    cscript /nologo "%temp%\getadmin.vbs"
    goto :EOF

:gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
:--------------------------------------
cls

powershell.exe -executionpolicy bypass -Command "& '%scriptPath%\pyRevit-Install-Main.ps1'"
echo Installation Complete
pause

Hi Andrea,

We do not need to customize our own clone.

I’m also not overly concerned about forcing settings, but I could modify the PowerShell script to run the full installer and then create the pyRevit_config.ini file.

The c:\pyrevit\master folder appears to be fully populated, but being new to this, I’m not 100% certain:

1 Like

I get similar results using the admin installer.

Here is the contents of C:\ProgramData\Autodesk\Revit\Addins\2023\pyRevit.addin

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<RevitAddIns>
    <AddIn Type = "Application">
        <Name>PyRevitLoader</Name>
        <Assembly>C:\Program Files\pyRevit-Master\bin\engines\IPY2711PR\pyRevitLoader.dll</Assembly>
        <AddInId>B39107C3-A1D7-47F4-A5A1-532DDF6EDB5D</AddInId>
        <FullClassName>PyRevitLoader.PyRevitLoaderApplication</FullClassName>
        <VendorId>eirannejad</VendorId>
    </AddIn>
</RevitAddIns>

I have confirmed that C:\Program Files\pyRevit-Master exists, and contains what appears to be all the files.

When I run Revit 2023, there is no pyRevit:

Hi JP,

I have tried Revit 2023 and 2024. No one in the office is using Revit 2025 yet, and we’ve had a problem with the install image, so I’m not too worried about it yet. That’s good to know I’ll need to use the WIP installer, but unfortunately it’s not working either.

SCCM runs with SYSTEM privileges, so it should have sufficient rights. The script runs, and the application installs, so I don’t think it’s a permissions issue. I have also run the script manually in the PowerShell console, using elevated rights via “Run as Administrator”.

Does SCCM allow to run scripts on behalf of users? The last attempt could be to use the non-admin installer just for the main user of the computer…

If that works, then the admin installation and management is definitely broken. Unfortunately this part of pyRevit hasn’t recieved the love it deserved and it was left for somebody with the rightntech skills to be picked up and solved…

  • Install from a user account not the admin account. It should be able to elevate itself to where it needs to be for the installation without requiring the user logged in to be an admin. System admin and admin user account are different and could be causing issue.

  • You showing multiple paths. Remove all files and try and start fresh.

  • Remove all of the excess path entries for the CLI. You likely have a path entry added for every time you tried to install.

  • For enterprise deployments should be using the admin signed CLI installer.

  • Use a pyRevit deployment instead of a raw clone. There is a bug in git where its not happy if the user cloning the repo (admin user) != the logged in user account

  • You should not be executing the powershell script directly. You should edit the file name of the batch script I posted above and place this bat file next to the powershell script and all of the installers

  • to install, double click the bat file, which will call your powershell. I found that if the bat file ran manually works, Intune will also work. But the the powershell script would fail with Intune even though it worked when executed directly

  • All of these scripts and files should be located in a subfolder of C:\ drive. The user folders or desktop or network drive will likely fail due to enterprise settings.

  • So even the non-admin installer does not work? Can you get pyRevit to install at all with any installer? If you can’t even get the basic non-admin, non-CLI version to install then whatever fancy AI security software they using needs to turn down.

As per Andrea’s instructions, I also tried the admin installer, pyRevit_4.8.16.24121_admin_signed.exe

This is what created C:\Program Files\pyRevit-Master

I have removed everything, and I’m trying it again, manually, without using the PowerShell script at all.

I have zero need to use the CLI (unless this is the only way I can get pyRevit to install in bulk). We have dozens of users, and I don’t want to have to install it manually for each person. That is why we are using SCCM to automate the deployment. Your one earlier comment concerns me though–you said the CLI installer won’t work for Revit 2025, which we will eventually need.

Potentially an added complication:
Does the main installer spawn a secondary .exe? We are using AppLocker, which blocks the execution of .exe files (unless they are whitelisted) if I do not manually elevate permissions.

If, as you suggested, I double-click on pyRevit_4.8.16.24121_admin_signed.exe, I get an error:

Unable to execute file in the temporary directory. Setup aborted.

Error 1260: This program is blocked by group policy. For more information, contact your system administrator.

Checking the Event Viewer logs, AppLocker shows Event ID 8004, which states:

%OSDRIVE%\USERS\STEPHENJ\APPDATA\LOCAL\TEMP\IS-37HGS.TMP\PYREVIT_4.8.16.24121_ADMIN_SIGNED.TMP was prevented from running.

However, when I browse to that location, there is no folder named IS-37HGS.TMP

If, instead, I right-click on pyRevit_4.8.16.24121_admin_signed.exe and choose Run as administrator then provide domain admin credentials, the Setup Wizard starts as it should, and walks me through all the installation steps.

Even though it says it installs properly, the addin file is created at C:\ProgramData\Autodesk\Revit\Addins\2023\pyRevit.addin, and the .addin file contents is pointing to the correct location:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<RevitAddIns>
    <AddIn Type = "Application">
        <Name>PyRevitLoader</Name>
        <Assembly>C:\Program Files\pyRevit-Master\bin\engines\IPY2711PR\pyRevitLoader.dll</Assembly>
        <AddInId>B39107C3-A1D7-47F4-A5A1-532DDF6EDB5D</AddInId>
        <FullClassName>PyRevitLoader.PyRevitLoaderApplication</FullClassName>
        <VendorId>eirannejad</VendorId>
    </AddIn>
</RevitAddIns>

when I run Revit 2023, there is no mention of pyRevit on the Add-Ins tab.

SCCM works by downloading all content to a cache in C:\Windows\CCMCache\<random letter>, then calls the installer.

Thus, all the files are located in a subfolder of C:\ drive. It has nothing to do with user folders, desktop, or network drives.

Trying to run the non-admin installer, signed into the computer with a NON-ADMIN account:

The non-admin installer is blocked by AppLocker, even though I have whitelisted anything published with your cert: O=EHSAN IRAN NEJAD, L=PORTLAND, S=OREGON, C=US.

In the Event Viewer logs, AppLocker shows Event ID 8004, which states:

%OSDRIVE%\USERS\STEPHENJ\APPDATA\LOCAL\TEMP\IS-1SIDL.TMP\PYREVIT_4.8.16.24121_SIGNED.TMP was prevented from running.

I have also tried adding C:\Users\*\AppData\Local\Temp\*\PYREVIT_4.8.16.24121_SIGNED.TMP\* as a path exception for AppLocker, but that doesn’t work either.

Trying to run the non-admin installer, signed into the computer with an ADMIN account:

The setup wizard runs, asks me to install the program into C:\Users\<admin account>\AppData\Roaming\pyRevit-Master, then completes the installation.

However, no pyRevit add-in shows up on the Add-Ins tab, even though this file exists:

C:\Users\<admin account>\AppData\Roaming\Autodesk\Revit\Addins\2023\pyRevit.addin

With these contents:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<RevitAddIns>
    <AddIn Type = "Application">
        <Name>PyRevitLoader</Name>
        <Assembly>C:\Users\admin account\AppData\Roaming\pyRevit-Master\bin\engines\IPY2711PR\pyRevitLoader.dll</Assembly>
        <AddInId>B39107C3-A1D7-47F4-A5A1-532DDF6EDB5D</AddInId>
        <FullClassName>PyRevitLoader.PyRevitLoaderApplication</FullClassName>
        <VendorId>eirannejad</VendorId>
    </AddIn>
</RevitAddIns>

I know how it works. My point is I don’t think this works for installing pyrevit. Microsoft Intune (similar but cloud-based deployment alternative) would not work with the pyrevit installers directly, but does if you use the work around I described.

As I posted, a non-admin account is blocked from running the non-admin installer by AppLocker. Your batch script workaround (which will also be blocked by AppLocker) won’t fix the issue. All that script is doing is programmatically creating a .vbs file, which raises the prompt for admin permissions by calling cscript (also blocked by AppLocker).

All of this is essentially the same as the Run as administrator option, when done manually.

Manually running the non-admin installer as an admin account should work. The files are installed and placed in the correct places, but it doesn’t show up in Revit.

Manually running the admin installer as an admin account should work. The files are installed and placed in the correct places, but it doesn’t show up in Revit.

So if manually installing pyRevit isn’t working, what hope do I have of automating the install?

The only installer my workaround uses is the CLI, which appears to work since you could use the commands in terminal.

This is really strange, non-admin installer run by non-admin account should install the plugin without any problem. I believe your policies are too restrictive, but I know nothing about GPO and other security policies…

The fact that no option shows up in the admin account is also really strange, isn’t it that the dll referenced in the .addin manifest is somehow blocked by the same policies/security systems in place?

I can offer this info to try to troubleshoot this issue further: edit the pyrevit_config.ini file to enable the debug and file logging:

[core]
debug = true
filelogging = true

If the addin loads at all, you should see the log files in %APPDATA%/pyRevit/<revit version>

For reference: Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.

My company has same restriction on using exe as well. I believe the rational is that an exe could be an installer or an executable program, but MSI does not have this ambiguity. How come the MSI is only available for the admin installer? Could this be easily added to the build workflow?

Because nobody built the non-admin one :wink:

We are following Microsoft’s best practices by blocking .exe’s from running unless they come from a recognized publisher or are located in a safe location. This is to keep malware off our systems.

Non-admin installers are never a good idea, because everything installed in %appdata% gets blocked. It’s just not realistic for an enterprise environment.

So that leaves me with the admin installer, installed by an admin account.

Here is the contents of C:\ProgramData\pyRevit\pyRevit_config.ini:

[environment]
clones = {"master":"C:\\Program Files\\pyRevit-Master"}
[core]
debug = true
filelogging = true

And here is the contents of C:\ProgramData\Autodesk\Revit\Addins\2023\pyRevit.addin:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<RevitAddIns>
    <AddIn Type = "Application">
        <Name>PyRevitLoader</Name>
        <Assembly>C:\Program Files\pyRevit-Master\bin\engines\IPY2711PR\pyRevitLoader.dll</Assembly>
        <AddInId>B39107C3-A1D7-47F4-A5A1-532DDF6EDB5D</AddInId>
        <FullClassName>PyRevitLoader.PyRevitLoaderApplication</FullClassName>
        <VendorId>eirannejad</VendorId>
    </AddIn>
</RevitAddIns>

Even with debug = true and filelogging = true, I’m getting nothing. No logs, no pyRevit add-in displayed in Revit 2023.

There has to be something going on with the installer, that prevents it from installing correctly. Does it use %temp% to do the installation? Since that folder is inside of %appdata%, it’s going to get blocked. If I knew what to unblock, I could add an exception to AppLocker.

This is an open source project hardly kept alive by volunteers, if you need enterprise level solutions you might need look elsewhere :sweat_smile: