Is there a way to get my INI file to be in the directory that the .exe is in or does it have to be in the C:\ root?
Printable View
Is there a way to get my INI file to be in the directory that the .exe is in or does it have to be in the C:\ root?
For the locations use apppath$ +"settings.ini"
That will then create a file called settings.ini in the application directory.
Many thx but I am having trouble as to where to set this.
Is it in the INI expression:
Set file to .... Apppath$+"Nameoffile"
which I then presume would use the file "Nameoffile" to save and load from? (in the application directory)
That's right - or alternatively, I always use "./filename.ini", which works equally well.
Ok Im a tad confused, I wonder if u could clarify pls
is it
"./filename"
or
".\filename"
?
MMF Converts slashes to the correct orientation "\" so dont worry. But some extensions will affect .\ paths (such as common dialog) so be careful.
And ideally for multi-user (and future Vista compatiblity) you should be writing into application data or %appdata%\Company Name\App Name\
You can use YASO to get the users application data path.
Or, %appdata%\Company Name\App Name\ should work. No need to use yaso if %appdata% works, is there?
It's never worked for me...
The File object contains a function to get the pathname of the AppData directory: AppDataDirectory$( "File" ).
Yves.
Will this work in older systems like Win 95 or Win 98?