How to set a global environment variable from Inno Setup installer?

后端 未结 3 1190
后悔当初
后悔当初 2020-12-16 05:17

How do I set a global environment variable in Inno Setup?

Background: I am using the Inno install utility and need to set a global environment variable before I

3条回答
  •  孤街浪徒
    2020-12-16 06:05

    What would be wrong with running two setup.exe with the first one doing the setting of the environment variables, and the second doing the things needed for the true setup. The first one would be run with setup.exe /VERYSILENT

    I am doing to add an system wide environment variable:

    [Setup]
    
    ; Tell Windows Explorer to reload the environment
    ChangesEnvironment=True
    
    [Registry]
    Root: "HKLM"; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: "EGPL_GeoLibrarian_Drive"; ValueData: "L"; Flags: createvalueifdoesntexist preservestringtype
    

提交回复
热议问题