Re: Can I use a special folder as part of a value in creating an INI File?
Yes - thanks !
Paul Macfarlane
Re: Can I use a special folder as part of a value in creating an INI File?
No, but the INI is in the program folder to tell the application where
the data is.
That way the user can set the common documents folder or some network
location.
It's only read by invoker applications..
This way my app can be installed on Win98, 2000, XP, Vista, Win7 2003,
2008, etc. and it behaves as expected for the platform.
Paul Macfarlane
Re: Can I use a special folder as part of a value in creating an INI File?
In a similar vein, for one app I store the data location in the HKLM portion
of the registry.
That way, it also works if the program resides on a USB or flash drive
because it will read the correct data location for that machine regardless
of the folder in which the app resides.
The app has a shellExecute - run asAdministrator helper app if the user
wants to modify the data location.
jf
Re: Can I use a special folder as part of a value in creating an INI File?
Paul,
Here is what I understood you were trying to do.
1. If you are installing a new customer, you want to use an allowed folder
(CSIDL). It doesn't matter what the OS, you want to put the INI file
somewhere that MS says is OK
2. If you are installing to a customer that that already has an old version
of the app (maybe running in an older version of the OS, it doesn't really
matter) you want to continue to use the old ini file which already exists.
3. Now that you have the ini file (new or old and it doesn't matter what OS)
it tells you where the data is.
You need this INI file location in your program at runtime when you want to
access the DB, not when the program is being installed. So you need to find
the CSIDL location using propath, winevent or SV's new feature in C7.1.
You will need IF EXISTS to determine if the INI file already exists.
Nothing in SB.
My recommendation if that if you find the existing INI file in a location
that is no longer allowed by windows, you move it to a valid location and
forget about the old location. Just use the allowed location for new or old
installs. If the INI file doesn't exist (new install) use the valid
location.
If I have your objectives all wrong, I apologize, please forget about his
post.
Regards,
--
Regards,
Abe Jimenez
Clarion 7.1.7118 EE
Windows 7 Pro 64 Bit