John Weller wrote on 2013-01-09:
> That explains why my loader program doesn't work! It was fine under XP
but
> fails in Win 7. What it does is install the exe in Program Files on the
> workstation then, when it runs, looks for a file called LocalCfg.DBF. If
it
> can't find it, which it won't on the first run as it won't be there, it
> creates it, asks the user where the data is and stores the path in the
DBF
> for use by the system then calls the main exe. It also checks on the
> version no of the master version on the server and compares it with the
> version on the workstation and if the server version is later downloads
it
> to the workstation.
>
> Obviously this approach won't work any longer - what does the team
recommend
> as an alternative? Would I be better installing the program in its own
> directory rather than Program Files?
>
> TIA
>
> John Weller
> 01380 723235
> 07976 393631
John,
Starting with Vista, a new hidden folder off the Root of %systemdrive%
exists called ProgramData.
Your loader app can use this folder to store the configuration database and
the executable.
It was recommended to use %systemdrive%\ProgramData\{Company Name}\{Program
Name} to store these files in.
Your loader application should check the OS version and respond accordingly.
OS(3) returns:
5 - Windows XP
6 - Windows Vista/7/8
Be aware, ADIR() will not see a file that has a hidden attribute unless you
specify to look for them. There was a problem that happened with several of
our clients. Somehow all the files under ProgramData had been marked as
hidden and it caused some problems until I changed code in our loader.
Tracy Pearson
PowerChurch Software
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.