You are here

Registry key values having paths?

3 posts / 0 new
Last post
Ciantic
Offline
Last seen: 14 years 1 month ago
Joined: 2010-10-18 12:55
Registry key values having paths?

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.

John T. Haller
John T. Haller's picture
Offline
Last seen: 7 hours 1 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
PAL

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!

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 5 months ago
Joined: 2007-04-15 21:08
Just RegistryKeys and RegistryValueWrite

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

Log in or register to post comments