… and the ConfigFilePath and AdminConfigFilePath will be the same…
…if IsRunAsElevated() gets true (if you run the ps script as admin):
The constants are defined here:
But I think it makes no sense that it copy from and to the same place!? I think there should be a temporary place, where the pyRevitConfig.ini gets prepared and finally it should copied to the programdata or appdata path.
Does it make a difference if I run the powershell as local or global admin?
/edit1:
I will try to use now the command “config” to configure pyRevit on my machine from an existing template configuration file:
pyrevit config <template_config_path> [–log=<log_file>]
$ pyrevit config “C:\myPyRevitTemplateConfig.ini”
Source:
Or maybe with another Powershell script snippet, I think it is the same result.
/edit3:
After inspecting the code, the documentation of pyrevit config is missing the --from= flag
The command only works if you use
and then it will be copied to the users %APPDATA%\pyRevit\pyRevit_config.ini.
Not sure yet if this solves my task or if I need to run a powershell script to copy the config template to each user.