[fpc-pascal] SysUtils.GetEnvironmentVariable
Marcos Douglas
md at delfire.net
Thu Mar 29 13:29:48 CEST 2012
On Thu, Mar 29, 2012 at 8:13 AM, Sven Barth <pascaldragon at googlemail.com> wrote:
> Am 29.03.2012 13:06, schrieb Marcos Douglas:
>
>> The application is installed and the system variable is created. The
>> application and others process should be use this variable just
>> calling SysUtils.GetEnvironmentVariable.
>
>
> Then let a FPC program print all passed environment variables as a test:
>
>
> === source begin ===
>
> program envtest;
>
> var
> i: LongInt;
> begin
> for i := 0 to GetEnvironmentVariableCount do
> Writeln(GetEnvironmentString(i)); // Note: this will include "name=value"
> unlike GetEnvironmentVariable
>
> end.
>
> === source end ===
I know it works on WinXP but my client uses Win7 and I don't have Win7
at this moment so, somebody can test this, please?
> Also - as I already wrote - you can use the Process Explorer (
> http://technet.microsoft.com/de-de/sysinternals/bb896653 ) to check whether
> the application does indeed contain the environment variable.
If the app do not found the environment variable, what I can tell to
the user? He do not know this things... the variable was set by
installer and the application should be able to use.
Marcos Douglas
More information about the fpc-pascal
mailing list