jimmejardine / qiqqa-open-source

The open-sourced version of the award-winning Qiqqa research management tool for Windows
GNU General Public License v3.0
366 stars 60 forks source link

Install with an executable that can run without UAC #328

Open mdrishti opened 3 years ago

mdrishti commented 3 years ago

Hi,

In the previous versions (uptil v79), there was an option to use an executable that does not require neither administrative privileges nor UAC. With the current open-source development versions, it becomes difficult to switch between versions. Is there a possibility to introduce an executable that does not require UAC?

I have tried to escape the UAC with qiqqa open-source, but it didn't work.

Regards, Dish

GerHobbelt commented 3 years ago

Duplicate of #124.

I don't have a good answer for this yet; will require looking into the inner workings of the nsis installer used to produce Qiqqa's setup exe - however that's exactly what commercial Qiqqa used as well so there's something that must be tweaked in there that I haven't found yet. 🤔

GerHobbelt commented 3 years ago

Commit SHA-1: 7e57cb25b4effbbea2be57c917a405f2a2a4253a

In that mode, the registry is only used for a few things, such as registering the qiqqa:// URI and .qiqqa_backup file extension for Qiqqa backup archives. Otherwise, all settings (such as Qiqqa Base Directory) are obtained from the Qiqqa.Portable.Settings.json5 JSON5-formatted configuration file, that must be present in the same directory as the qiqqa.exe executable for it to be recognized as a Portable Application.

The technique used is to make a Portable Application a kind of "developer override" mode: the same files are involved and the way configuration bits and pieces are specified/overridden is the same.

Re "developer override mode" (see also Github):

Now we support the Qiqqa.Developer.Settings.json5 developer config file in the application directory too! (Next to that Qiqqa.Portable.Settings.json5 file)

When we have determined the Base Directory in Qiqqa, we also load the other Qiqqa.Developer.Settings.json5 file that may be available there: hence we now support a chain of 2..3 developer override config files, all formatted the same way, and loaded in this order

All these files are optional; the EXISTANCE of the Qiqqa.Portable.Settings.json5 file determines whether Qiqqa acts like a Portable Application or as a regular install - the file may even be empty then!

Extra: the developer config files can now also override the registry entries used by Qiqqa for various configuration settings:

  "DebugConsole": false,
  "AllowMultipleQiqqaInstances": true,
  "BaseDataDirectory": "Z:\\lib\\tooling\\qiqqa\\Qiqqa\\bin\\Debug\\My.Qiqqa.Libraries",
  "LoadKnownWebLibraries": true,
  "AddLegacyWebLibrariesThatCanBeFoundOnDisk": true,
  "SaveKnownWebLibraries": true,
  "DoInterestingAnalysis_GoogleScholar": false,
  "FolderWatcher": true,
  "TextExtraction": true,
  "SuggestingMetadata": true,
  "BuildSearchIndex": true,
  "RenderPDFPagesForSidePanels": true,
  "RenderPDFPagesForReading": true,
  "RenderPDFPagesForOCR": true,
  "FirstInstallNotification": "83"

While almost all these settings are only relevant for testers or very specialized activities, the BaseDataDirectory setting is very useful as it points Qiqqa to where all your libraries are stored.

You can still easily change that value using the ChangeThisPath button in the startup dialog:

image

and any change there will be saved to the Portable Application's json5 config file so the next time you start Qiqqa, it will automatically point at the desired directory tree.


This feature will be available in the next test release.