Getting environment variable using Inno installation

I have a file update version that I must provide to the user,

I gave the user the opportunity to install the source software wherever they want,

So now, to complete the update, I need the PATH system variable to find out where they installed the software,

I have the following code:

[Setup]
#define path GetEnv('TEMPFILE')
DefaultGroupName={#path}

[Files]
Source: "E:\folder \license.exe"; DestDir: "{app}\temp\installation_files\"; Flags: ignoreversion

But the code causes an installation error!

Does anyone know why?

Maybe I can do it differently

Can someone explain to me a hoe that this function works:

function GetEnv(const EnvVar: String): String;
-1
source share
1 answer

The solution that worked for me can be found at the following link:

Retrieve an environment variable using RegQueryStringValue in Inno Setup

0

Source: https://habr.com/ru/post/1526391/


All Articles