[fpc-pascal] SysUtils.GetEnvironmentVariable
Marcos Douglas
md at delfire.net
Thu Mar 29 13:11:04 CEST 2012
On Thu, Mar 29, 2012 at 5:42 AM, Mark Morgan Lloyd
<markMLl.fpc-pascal at telemetry.co.uk> wrote:
> Marcos Douglas wrote:
>
>> I know that I have to define the environment variable before or after
>> starting the application or IDE.
>> As I said, works in WinXP... but I had a little problem with a client
>> using Win7 so, I talked about this on lazarus-br list and asked to
>> somebody do the test on Win7 and they said the test did not work so, I
>> wrote here.
>
>
> I think the absolutely crucial thing here is to ask what the relationship
> between the session in which the shell/environment variable was defined, and
> the FPC program.
Nothing.
> If the variable is set and the program is run from the same prompt, provided
> that it's not messed up by extra spaces or by e.g. an interposed
> command.com, then it should work.
No. The variable is set using a install program or Windows.
> In any other case it might work, and it's entirely reasonable to assume that
> the extent to which variables are passed between running processes will vary
> wildly with OS version.
>
> I suggest the *first* thing to do is to confirm that the variable has stuck
> by using the set command. After that try running the Pascal program.
No command set is used.
The variable has been created in the Windows System Variables.
Marcos Douglas
More information about the fpc-pascal
mailing list