Installing .rhi files from the command line

https://wiki.mcneel.com/rhino/installrhi

I am wanting to install a .rhi file from the command line (preferably through a custom command), and be able to update the files within the .rhi directory as new updates come out. What is the best method to do this?

When I copy this text into the command line, it doesn’t work (see the ^link). When I run a Python script using the rhinoscriptsyntax rs.command(“string”) function, it doesn’t work either.

Hi @comp-designer.nz,

Something like this might do the trick:

import System

def test_install_rhi(path_rhi):
    path_exe = 'C:\\Program Files\\McNeel\\Rhino Installer Engine\\x64\\rhiexec.exe'
    process = System.Diagnostics.Process()
    process.StartInfo.UseShellExecute = True
    process.StartInfo.FileName =  '"{}"'.format(path_exe)
    #process.StartInfo.Arguments = '"{}" /admin /silent'.format(path_rhi)
    process.StartInfo.Arguments = '"{}"'.format(path_rhi)
    process.Start()

if __name__ == "__main__":
    # Something to install
    path_rhi = 'C:\\Users\\Dale\\Downloads\\vectorize-707854.rhi'
    test_install_rhi(path_rhi)

If you are using Rhino 7, you might have a look at the Package Manager:

It’s the replacement for the RHI installer.

– Dale

I would use the package manager, but the work isn’t ready to be made public. I’ll give that script a go. Is there an opportunity to deliver updates to the plugin via this method? If I want to add new functionality/methods, can this be done by overwriting versions of the installer/package?

The package manager supports versioning, if that is your question. Simple .rhi installers do not.

– Dale