Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MiKTeX.Session could not be initialized error in a normal miktex #41

Closed
u-fischer opened this issue Jul 31, 2014 · 9 comments
Closed

MiKTeX.Session could not be initialized error in a normal miktex #41

u-fischer opened this issue Jul 31, 2014 · 9 comments
Assignees
Labels

Comments

@u-fischer
Copy link

I downloaded today dvisvgm-1.8-win32.zip and unpacked it in a folder. When I tried
dvisvgm --help I get the error message "MiKTeX.Session could not be initialized".

I don't have a portable miktex.

It is a 32-bit miktex, installed as a single user installation in a normal user account (without admin rights) in D:\miktex2.9. on a 64bit windows 7.

@mgieseki
Copy link
Owner

Unfortunately, I haven't been able to reproduce the issue yet. Could you check if your Windows registry contains the COM class "MiKTeX.Session"? There should be an entry Classes\MiKTeX.Session\CLSID with the value {A2662D75-3286-4A8D-8050-C0FD76393A31}.

If you installed MiKTeX without admin access, I suppose the installer wasn't able to register the COM class. Since the bundled utilities that come with MiKTeX don't rely on the the COM interface, this usually doesn't matter. As a third-party application, dvisvgm can interact with MiKTeX only via this interface, though.

@u-fischer
Copy link
Author

I can't find a MiKTeX.Session entry in the registry. Is this only a problem of a missing key (which I could add) or does this means that some interface component is missing? In the first case in which registry branch should the key go? (I did found Classes in HCU/Software and HLM/Software.)

@mgieseki
Copy link
Owner

I don't know much about the details how the MiKTeX installer works and what components are skipped if it gets restricted permissions only. Maybe Christian Schenk can shed some light on this. There are many entries related to the MiKTeX COM interface spread over my Windows registry (below HKCR and HKLM/Software) . So I guess, it's not enough to add a single value to get a properly working environment.

@u-fischer
Copy link
Author

OK. I will ask on the miktex site.

It is not very pressing: I do have a Texlive and can use its dvisvgm.

I actually only wanted to test the newest dvisvgm because this question: http://tex.stackexchange.com/questions/194126/did-one-manage-to-get-the-new-dvisvgm-driver-from-pgf-3-0-to-work (where the edits regarding the viewbox sounds as if the problem could be also be seen with older dvisvgm)

@mgieseki
Copy link
Owner

Thanks for your feedback and the context. I had a look into the example file posted at TeX.SX. The SVG file generated with the latest PGF package looks fine. However, the global bounding box doesn't enclose the graphics portion inserted by the PGF driver. Thus, there's probably a dvisvgm:bbox \special missing in the driver's code.

@mgieseki mgieseki self-assigned this Aug 1, 2014
@u-fischer
Copy link
Author

After a year I made another effort to get it working and found with the help of Christian Schenk a way to register the COM-interface in a single user installation (https://sourceforge.net/p/miktex/bugs/2376/):

  1. Open a command line with admin rights (search in den windows search field for cmd.exe, right click and choose "run as administrator").
  2. Navigate to the folder of the miktex binaries.
  3. Run
regsvr32 MiKTeX209-core-PS.dll
regsvr32 MiKTeX209-core.dll
regsvr32 MiKTeX209-packagemanager-PS.dll
regsvr32 MiKTeX209-packagemanager.dll

@mgieseki
Copy link
Owner

mgieseki commented Jul 1, 2015

Thank you for your further investigations and the feedback about the solution that fixes the issue. I'll add these information to the FAQ page of the dvisvgm website.

@RemDelaporteMathurin
Copy link

3. Run

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

Note: these commands may need to be adapted depending on the MiKTeX version.
At the time of writing:

regsvr32 MiKTeX220300-core-PS.dll
regsvr32 MiKTeX220300-core.dll
regsvr32 MiKTeX220300-packagemanager-PS.dll
regsvr32 MiKTeX220300-packagemanager.dll

@deining
Copy link
Contributor

deining commented Jan 13, 2025

Three years later, there is again some adaption needed.
With a local MikTeX Installation, that worked for me at the time of writing:

cd %LOCALAPPDATA%\Programs\MiKTeX\miktex\bin\x64
regsvr32 MiKTeX240400-core-PS.dll
regsvr32 MiKTeX240400-core.dll
regsvr32 MiKTeX240400-packagemanager.dll
regsvr32 MiKTeX240400-packagemanager-PS.dll

I just opened #282 where I requested to change the outdated FAQ topic on this issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants