Hi!
I am trying to make TeXnicCenter portable (and make it work with miktex-portable), I have managed to make it start just fine, but since it saves most of the settings to registry I have stumbled upon problems.
The registry key values has directory paths such as:
[HKEY_CURRENT_USER\Software\ToolsCenter\TeXnicCenter\Profiles\LaTeX => PDF] "LatexPath"="C:\\ProgramCopies\\miktex-portable\\miktex\\bin\\pdflatex.exe" "BibTexPath"="C:\\ProgramCopies\\miktex-portable\\miktex\\bin\\bibtex.exe" "MakeIndexPath"="C:\\ProgramCopies\\miktex-portable\\miktex\\bin\\makeindex.exe" ...
As one can see I must now somehow replace these paths "C:\\ProgramCopies\\miktex-portable\\"
with something lets say starting directory upon startup?
It would be easy to do if I could run a script before importing settings.reg and after saving the settings.reg, so I could manipulate the registry file myself.
Thanks.
I'm pretty sure the PA.c Launcher can handle all of that with a combination of RegistryKeys, RegistryValueWrite and RegistryValueBackupDelete
Sometimes, the impossible can become possible, if you're awesome!
Use RegistryKeys to get it in place, then RegistryValueWrite to write it (because it is processed after the keys are loaded). Then the values %PAL:AppDir% etc. can be used.
Oh, and remember to put REG_SZ: in front of the value; otherwise it will recognise %PAL as the type and fail. So
HKCU\Software\ToolsCenter\TeXnicCenter\Profiles\LaTeX => PDF\LatexPath=REG_SZ:%PAL:AppDir%\miktex\bin\pdflatex.exe
or things like that.I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1