Directories in Windows & WinDev

Directories in Windows and WinDev
 
Windows
Each version of Windows comes with differently named system directories and its own rules of their use. Microsoft has to take care of the ever-growing waves of malware on one hand and on the other of separation of users and their access to the computer according to their rights.
 
In WinDev we can find some convenient commands for making us independent of the version of Windows used by our customers. fExeDir(), fCurrentDir(), fGlobalDir(), fGlobalDirCommon, fDataDir(), fDataDirCommon(), fDataDirUser(), plus the command SysDir() lets us find a whole lot of commands more.
 
Starting with Windows XP, there came the MS-recommendation to put programs and data into different directories. This call hasn’t been heard a lot however. Software vendors continued to put data into sub-directories of their exe-directories in the \programs (German: \Programme) folder or even into the same directory where the executables were installed. Many software suppliers ignored that straight away and installed their programs into the root of the hard-disk, like C:\OurProgram - lastly it should turn out that they were best off of all. Data should not be put into the \programs folder but should go into the new folder \Documents and Settings (German: \Dokumente und Einstellungen) were shou
 
Windows Vista surprised a lot of software makers because Vista doesn’t allow any write operations in the \Programs or \Programs (x86) folders anymore. Initially, many programs were not ‘Vista compatible’ and software makers had to take the trouble to separate program and data. Microsoft offered a new folder \Program Data as a home for data. Still, there has been an additionally ignored recommendation at least since Windows XP - the structure of the data folder depends on user and (software-)company! There’s one folder for \All Users and other ones for each user of the computer. The subdirectories for users in their \UserName folder or \All Users have to be the software company’s name like \Microsoft and at last the software product’s name! Data for multiuser access would therefore sit in
\Program Data\All Users\YourCompanyName\YourProgramName
Remember the phrase YourCompanyName for later.
 
In Windows 7, names and placing of the various Windows system directories has changed once again. A \Users (German: \Benutzer) directory takes care of the data now. Programs should go into \Programs or \Programs (x86) directories (German: \Programme + \Programme (x86) ). Again, the recommended place for HyperFileSQL-Classic multi-user Data would be
\Users\All Users\YourCompanyName\YourProgramName
 
WinDev
Independent of any ‘real’ data placement and connections, it is recommended to define the data in the WinDev analysis to be of
- HyperFileSQL Classic
- Connection: none
- Default directory of file: Application directory
 
When opening the application you / your customer can decide about data connection type (e.g. HyperFileSQL Server, MSSQL, MySQL) and just in case of HyperFileSQL Classic one can set the directory for the ‘real’ data, which may be on the same PC or somewhere in the LAN.
 
Warning! The command fDataDirUser() will return different results depending on whether the program is run in Test Mode (‘GO!’) or as an executable file. This is because you will define a ‘company name’ when creating the 32-bit or 64-bit executable. This company name is used as the above mentioned ‘YourCompanyName’ for the exe program and the command fDataDirUser()! However, the project description itself does not contain a definition of ‘company name’ and subsequently the data is put in a different place while working in Test Mode!! As long as PC Soft does not add a ‘company name’ in the project’s description, it is recommended to use the command fGlobalDirUser() (the directory \Users in Windows7) instead and add company name and Apüplication name programmatically!
 
PathToHFClassic = CompleteDir(fGlobalDirUser())+MyCompanyName+"\"+MyApplicationName

 

 
 
 
 
BuiltWithNOF
[Home] [English] [WX Links] [Deutsch] [Impressum] [Downloads] [RADTranslate] [Upper] [NullValues] [TableOnStructure] [HFClassicHFSQL] [RAD11] [USBFind] [Color Contrast] [Dec. Separator] [Setup Problems] [Directories] [Help Authoring] [Access CHM] [Make GUID] [HOpen Files] [Reset Table] [Int. Gen. Number] [TAB-Control] [fDataDir.. commands] [Calendar Weeks] [Input & check EAN 8/13] [Test_for_Dups] [Feiertage] [MemStick as Dongle] [Get Date & Time] [German phone book]