Inno Setup compilation fails with “Required parameter ”Root“ not specified.” even when there is one

后端 未结 1 827
耶瑟儿~
耶瑟儿~ 2021-01-17 04:24

I\'m a beginner about Inno Setup.
I want create an installer which copy two .exe files and append a value to the PATH environment variable.

Particularly I have t

相关标签:
1条回答
  • 2021-01-17 04:53

    When you want to break a section entry to multiple lines for readability, you have to add \ at the end of the lines to escape the new-line character(s). A good practice is also to indent the lines, to make it clear to a human reader.

    [Registry]
    Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
        ValueType: expandsz; ValueName: "PATH"; ValueData: "{olddata};{pf}\pandocX64"; \
        Check: NeedsAddPath('{pf}\pandocX64')
    

    Otherwise the Inno Setup compiler treats each line as a separate, and consequently an incomplete, entry.


    I've corrected the answer to How do I modify the PATH environment variable when running an Inno Setup Installer? to include the \'s.

    0 讨论(0)
提交回复
热议问题