Search code examples
visual-studio-codelatex

VSCODE Latex, security risk: running with elevated privileges


Environment:

  • OS: Window 10,x64
  • VSCode: 1.69.1
  • Related VSCode Plugins installed: LaTeX,LaTeX Workshop,LaTeX Utilities,LaTeX language support
  • Latex: MiKTeX 21.12.10 Portable
  • The VSCode Configuration is below
    "latex-workshop.latex.recipes": [
        {
            "name": "pdflatex -> bibtex -> pdflatex*2",
            "tools": ["pdflatex", "bibtex", "pdflatex","pdflatex"]
        },
        {
            "name": "xelatex",
            "tools": ["xelatex"]
        }, 
        {
            "name": "latexmk",
            "tools": ["latexmk"]
        },
    ],
    
    "latex-workshop.latex.tools": [
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": ["-synctex=1","-interaction=nonstopmode","-file-line-error","-pdf","-outdir=./output","%DOCFILE%"]
        }, 
        {
            "name": "xelatex",
            "command": "xelatex",
            "args": [ "-synctex=1","-interaction=nonstopmode","-file-line-error","-output-directory=./output","%DOCFILE%"]
        }, 
        {
            "name": "pdflatex",
            "command": "pdflatex",  
            "args": [ "-synctex=1","-interaction=nonstopmode","-file-line-error","-output-directory=./output","%DOCFILE%"]
        }, 
        {
            "name": "bibtex",
            "command": "bibtex",
            "args": [ "./output/%DOCFILE%"]  
        },
    ],
    
    "latex-workshop.view.pdf.viewer": "tab",   
    "latex-workshop.latex.clean.fileTypes": [  
      "*.aux", 
      "*.bbl",
      "*.blg",
      "*.idx",
      "*.ind",
      "*.lof",
      "*.lot",
      "*.out",
      "*.toc",
      "*.acn",
      "*.acr",
      "*.alg",
      "*.glg",
      "*.glo",
      "*.gls",
      "*.ist",
      "*.fls",
      "*.log",
      "*.fdb_latexmk"
    ],
    "latex-workshop.latex.autoClean.run": "never",
    "latex-workshop.latex.recipe.default": "first",
    "latex-workshop.view.pdf.external.viewer.args": [
        "./output/%PDF%"
    ],
    "latex-workshop.latex.outDir": "./output",

I use VSCode to write latex. And it occurs the errors below:

  • chktex: security risk: running with elevated privileges
  • Cannot count words, code: 4294967295, texcount: security risk: running with elevated privileges

How to solve it?

I have tried to run VSCode with administrator, but it didn't help.


Solution

  • I solved it.

    Only the plugin LaTeX Workshop is needed. Other plugins(LaTeX,LaTeX Utilities,LaTeX language support) can be uninstalled.