Script and api folder cause odd results

Product: PowerShell Universal
Version: 5.3.3

In settings/general/
APIs and Data
change the API Base Folder
or the Script Base Folder

will create a %ProgramData% folder under Reposititory, plus all subfolders.



Interesting. I have exactly that in my 5.2.3 setup on windows 2022 and its created folders without that extra hierarchy


Heres the bits from my appsettings.json and settings.ps1 in case theres something diffn in yours thats easy to spot - its only a few versions diffn.

image

1 Like

Did you file an issue on GitHub for this? Definitely seems like a bug.

not yet

The issue could be that I left the repository path to default.

“RepositoryPath”: “%ProgramData%\UniversalAutomation\Repository”,

So seemingly %ProgrammData% does not get resolved and the whole string simply added to the repository path.

Tried again on my 5.3.3 dev server.

my appsettings.json is default for these values:

  "Data": {
    "RepositoryPath": "%ProgramData%\\UniversalAutomation\\Repository",
    "ConnectionString": "Data Source=%ProgramData%\\UniversalAutomation\\database.db"
  },

Setting the API folder to “APIs” adds it correctly to settings.ps1, but creates the wrong folder path.

C:\ProgramData\UniversalAutomation\Repository\%ProgramData%\UniversalAutomation\Repository\APIs

Setting the Script folder to “Scripts” fails with an error message and does NOT change the settings.ps1, but as well creates the faulty folder path.

C:\ProgramData\UniversalAutomation\Repository\%ProgramData%\UniversalAutomation\Repository\Scripts


1 Like