New sqlite data source in non-default location

Resolved

New sqlite data source in non-default location

avatar
gdbarron
Disabled

Hi all. I'm trying to create a new sqlite data source and point the db to a location where admin rights aren't required, meaning not c:\program files (x86), the default. I've tried to specify a full path for the database parameter, but that did not work and I keep getting

New-RdmDataSource -SQlite -Database "$env:temp\MyDSName" -Name 'MyDSName' -SetDataSource
Unable to create database.
Access to the path 'C:\Program Files (x86)\Devolutions\Remote Desktop Manager\MyDSName' is denied.


I've also tried appending .db to the database name, no go. Could you please point me in the right direction? Thanks!

All Comments (3)

avatar

Hello,

First I must say that through RDM we do not create the database in program files, but rather in %LOCALAPPDATA%

In its current state, the statement registers a new datasource indeed, but it does not initialize a new SQLite file. I must say that for our XML formats it will perform it as a side effect, so it seems our SQLite option is limited at this time.

There is the matter of allowing encrypting the database with a password, as well as a few interactive prompts to get rid of. I will escalate to engineering to see if its possible to improve this.

In the mean time, if you initialize a new SQLite datasource using RDM (without encryption/password), you could use the resulting Connections.db file as a template, simply copy it as required.

Best regards,

Maurice

avatar

Thanks, Maurice. Not sure I followed your reply. What is it that is trying to access that path and failing? I am scripting the creation of a sqlite ds for many users so unfortunately the workaround of copying a file doesn't scale. If I was to have folks copy that file as part of their initial setup, I still don't understand how I would automate it. Meaning, where would I copy the file to and what command would I use to create the new data source?

avatar

the workaround is not around a temporary bug, it’s a feature that never existed so it’s the only way

As far as making the solution, we can definitely help. Tell me, how will the script be deployed to each workstation?

Maurice