Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have an update version of a file that I need to provide to the user,

I have given the user the choice to install the original software wherever they want,

So now to do the update I need the PATH system variable to know 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}	empinstallation_files"; Flags: ignoreversion

But the code gives me an error during installation!

Does someone know why?

Maybe i can do this differently,

Can someone explain to me hoe this function works:

function GetEnv(const EnvVar: String): String;
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
176 views
Welcome To Ask or Share your Answers For Others

1 Answer

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

Retrieve environment variable using RegQueryStringValue in Inno Setup


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...