Justin
I once had the same problem, tried a lot of settings and kludges, but to no avail. If you just need the data in a string do as did
var
tf: TextFile;
s: string;
AssignFile(tf,YourFileName);
Reset(tf);
ReadLn(tf,s);
CloseFile(tf);
s will have the entire line here.
HTH...
Michael,
I've just checked it and the Win9x family of OSs doesn't set the USERPROFILE environmental variable, and for this reason the code snippet I sent you doesn't work.
You must check the OS running and take the proper path then.
Porteiro
I don't know of any other means of getting the docs and settings path.
As to the %USERPROFILE% env var you can use the code below as a starting point:
SetLength(sVarValue,255);
GetEnvironmentVariable('USERPROFILE',PChar(sVarValue),255);
SetLength(sVarValue,StrLen(PChar(sVarValue)))...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.