Menu

#2376 MiKTeX session object missing in single user installations?

open
nobody
None
2015-07-01
2015-07-01
U_Fischer
No

After a year I just remembered an open problem:

dvisvgm (http://www.ctan.org/pkg/dvisvgm) is not part of miktex so I tried to install it manually. I download the precompiled 32-binary (http://dvisvgm.sourceforge.net/Downloads).

Trying to run it give this error message:

F:\Install\dvisvgm>dvisvgm --help
ERROR: MiKTeX.Session could not be initialized

The author of dvisvgm said in a discussion about the issue (https://github.com/mgieseki/dvisvgm/issues/41) that dvisvgm needs access to the MiKTeX COM interface which seems not to be available on my system -- probably because I installed miktex as single user without admin rights.

Would it be possible to install/activate the COM interface?

Discussion

  • Christian Schenk

    mpm --register-components
    will register the DLLs. You must have administrative permissions (run cmd.exe as administrator).

     
  • U_Fischer

    U_Fischer - 2015-07-01

    This doesn't work. If I open cmd.exe with "run as administator" miktex tries to find the components in the profile of the admin account (this is on windows 7):

    G:\>set path=D:\MiKTeX2.9\miktex\bin;%path%
    
    G:\>mpm --register-components --verbose
    problem: C:\Users\ADMIN\AppData\Roaming\MiKTeX\2.9\fontconfig\config\fonts.con
    f.in does not exist
    problem: C:\Users\ADMIN\AppData\Roaming\MiKTeX\2.9\miktex/bin\MiKTeX209-core.d
    ll does not exist
    problem: C:\Users\ADMIN\AppData\Roaming\MiKTeX\2.9\miktex/bin\MiKTeX209-core-P
    S.dll does not exist
    problem: C:\Users\ADMIN\AppData\Roaming\MiKTeX\2.9\miktex/bin\MiKTeX209-packag
    emanager.dll does not exist
    problem: C:\Users\ADMIN\AppData\Roaming\MiKTeX\2.9\miktex/bin\MiKTeX209-packag
    emanager-PS.dll does not exist
    

    This probably means that I will have to give the account temporarly admin rights.

    Edit

    Thinking about it I have some doubts that giving the account admin rights will help. After all the dll are not in Appdata of the user account either.

    I also tried the --admin switch

    G:\Z-Test>mpm --register-components --verbose --admin
    problem: C:\Program Files (x86)\MiKTeX 2.9\fontconfig\config\fonts.conf.in does
    not exist
    problem: C:\Program Files (x86)\MiKTeX 2.9\miktex/bin\MiKTeX209-core.dll does no
    t exist
    problem: C:\Program Files (x86)\MiKTeX 2.9\miktex/bin\MiKTeX209-core-PS.dll does
     not exist
    problem: C:\Program Files (x86)\MiKTeX 2.9\miktex/bin\MiKTeX209-packagemanager.d
    ll does not exist
    problem: C:\Program Files (x86)\MiKTeX 2.9\miktex/bin\MiKTeX209-packagemanager-P
    S.dll does not exist
    

    This looks a bit more logical, but is still the wrong folder. Is there any environment variable that I could set to point mpm to D:\Miktex?

     

    Last edit: U_Fischer 2015-07-01
  • Christian Schenk

    What mpm --register-components actually does: it calls regsvr32 four times:

    regsvr32 MiKTeX209-core-PS.dll
    regsvr32 MiKTeX209-core.dll
    regsvr32 MiKTeX209-packagemanager-PS.dll
    regsvr32 MiKTeX209-packagemanager.dll

    You can make these calls (as administer).

    dvisvgm should then find the MiKTeX COM objects.

     
  • U_Fischer

    U_Fischer - 2015-07-01

    This worked perfectly. Four friendly dialogs confirming the registration and a working dvisvgm ...

    I saw that I actually made a feature request last year about this: https://sourceforge.net/p/miktex/bugs/2376/. I will put there a link to this discussion here. And I will inform the dvisvgm author. He could add instruction to his websites.