Forum moved here!

Home / [Feature Request] Define environment variables and/or Registry Entries

lorist

SumatraPDF is a great product, at least for me.
I was cheking before, durung and after a SumatraPDF session, the settings in my Win10 Environment variables and in my Registry. I have found only the settings made by the SYSTEM itself, but not settinds by the SumatraPDF.
If it is possible I want to suggest a new feature for SumatraPDF.
Please define one or two new shorcut command -E and -H, symilar to -D to define the same variables/reg-entries as the -D does. (Or these things are possible as an extension to the -D shortcut, or more simple without any command as an automatic SumatraPDF settings on the environment and/or in Registry for the last opened document.
The suggested new feature would be usefull to write editor commands or compose SumatraPDF scripts.
Many thanks in advance:
lorist

SumatraPeter

What does -D do? According to the docs and source there’s no -D defined as a valid command line param for Sumatra.

lorist

-D hier means (CTRL)-D is listing in a new window the basic attributes of the current document. I was asking the same in environment variables and/or in registry entries.
Regards: lorist

GitHubRulesOK

@lorist
< Ctrl> D is an internal command to show internal file data
generally viewer apps such as SumatraPDF do not change the External Environment settings hence there would be little point in adding a + E window simply to show External System settings
IF you need to see the running DOS environment simple attempt to open a file and in the file window invoke a CMD file containing %comspec% /K SET you should NOTE there is NOT likely to be any reference to SumatraPDF

Equally there is little value using H to show the contents of the External Hive, admittedly there could be hundreds of ever changing entries referencing SumatraPDF but in their raw state they are unlikely to be of any value to most users and most likely to result in unecessary questions
If you need to extract the value of the last file open with a script then you could either parse the settings file or use reg.exe extract feature but in both cases beware it could break your set-up

What you may find useful for scripting is the ability to call an external command with the current file and page number SEE “External viewers” function in the documentation also there is the ability to call sumatraPDf from a script via the command line

lorist

OK! I respect & addept yorur counter indications. Many thanks for Your attention!
Regards: lorist

SumatraPeter

I honestly can’t make heads nor tails of your request. You want the file metadata displayed by the Ctrl+D Properties dialog to be made available as environment variables or registry entries? Why? If you want to extract document metadata and use it in your command-line scripts then just use a program meant for that purpose (depending on the file type). Sumatra, being a reader, is not that program.