pyrevitlabs / pyRevit

Rapid Application Development (RAD) Environment for Autodesk Revit®
http://wiki.pyrevitlabs.io
GNU General Public License v3.0
1.28k stars 332 forks source link

Pyrevit 4.8.16.24121 not working via SCCM #2304

Open JunoJolly opened 2 months ago

JunoJolly commented 2 months ago

Installation of Pyrevit 4.8.16.24121 went well, but unable to view the plugin in Revit. If I manually install the application , I can see the plugin in Revit. So just want to confirm whether this plugin will support in SCCM or not.

jmcouffin commented 2 months ago

Please have a look at https://github.com/pyrevitlabs/pyRevit/issues/1642#issuecomment-1369843429

JunoJolly commented 2 months ago

Do we have any documentation which we can refer for the installation via SCCM

sanzoghenzo commented 2 months ago

Not strictly SCCM related, but this should help

https://pyrevitlabs.notion.site/pyRevit-For-Teams-ddc6c312d6f6488691eed2ec7704fd97

GHiarsixty commented 2 months ago

My experience with the SCCM installer is to script this sequence: Install the CLI, then clone pyRevit, copy a configured pyRevit_config.ini file into c:\programdata\pyrevit, then run the CLI attach command. When using the same PC over and over for testing, there can be remnants that may cause unexpected behavior. I delete everything pyRevit I can find first before testing. Here's the powershell code for what I'm deleting. Frankly I don't remember if I wrote this part or cribbed it from somewhere.

$ErrorActionPreference = "Continue"
Remove-Item -Path "C:\Users\*\AppData\Roaming\pyRevit\pyRevit_config.ini"
Remove-Item -Path "C:\ProgramData\pyRevit\pyRevit_config.ini"
Remove-Item -Path "C:\Windows\System32\config\systemprofile\AppData\Roaming\pyRevit\pyRevit_config.ini"
Remove-Item -Path "C:\Users\*\AppData\Roaming\pyRevit" -Recurse
Remove-Item -Path "C:\Windows\System32\config\systemprofile\AppData\Roaming\pyRevit" -Recurse
Remove-Item -Path "C:\ProgramData\Autodesk\Revit\Addins\*\pyRevit.addin"
Remove-Item -Path "C:\WINDOWS\TEMP\master\pyRevit-master" -Recurse
Remove-Item -Path "C:\pyRevit" -Recurse
sanzoghenzo commented 2 months ago

Thanks @GHiarsixty for the added info! this would make a good addition in our "knowledge base", do you think you can make it into a tutorial in the forum to explain all the steps in detail?

regarding the code snippet, I believe you can simplify it like this

$ErrorActionPreference = "Continue"
Remove-Item -Path "C:\ProgramData\pyRevit\pyRevit_config.ini"
Remove-Item -Path "C:\Users\*\AppData\Roaming\pyRevit" -Recurse
Remove-Item -Path "C:\Windows\System32\config\systemprofile\AppData\Roaming\pyRevit" -Recurse
Remove-Item -Path "C:\ProgramData\Autodesk\Revit\Addins\*\pyRevit.addin"

since you're recursing the entire directories, you don't need to remove the config file first. And the last two paths are specific to your case, so they are generally not needed; users/admin should add their custom paths, though.