Skip to content

How to use the system environment variables in the settings.txt when invoking a path? #4768

Answered by GitHubRulesOK
WuSiren asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for delay I thought I had posted this older example and it may not be what I finally used as that machine is not here.
So try to adapt to your own requirements.

set "drive=%~d0"
set "dirPath=%CD%"
REM for a fixed location from drive root use something like
REM set "SumatraPDF=%drive%SumatraPDF\SumatraPDF(32bit).exe"
REM for relative use here I am using 
set "SumatraPDF=..\..\..\apps\pdf\sumatrapdf\SumatraPDF(32bit).exe"

REM Batch files need each used % to be doubled %% and quotes are another problem
REM InverseSearchCmdLine = notepad.vbs %%l "%%f"

set "Inverse=\"%CD%\notepad.vbs\" %%l \"%%f\""

"%SumatraPDF%" -forward-search "sync.tex" 1 "sync.pdf" -inverse-search "%Inverse%" 

pa…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@GitHubRulesOK
Comment options

Answer selected by WuSiren
@WuSiren
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants