Dave Coventry schreef: > Hi, > > I'm trying to get the name of the computer my app is running on. > > I've tried this: > >
> I'm not sure if it works under Windows, but running Ubuntu, it returns > '$HOSTNAME'. > > Can anyone see what I'm doing wrong, or offer an alternative way of > getting the name of the computer? $HOSTNAME is replace by the shell, so it only happens if let the shell execute the command. In this case GetEnvironmentVariable('HostName') (from the sysutils unit would be a lot easier. Vincent _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus