The Windows OS in use and the status of UAC are both irrelevent. MT4 creates and uses the Data Folder regardless.
On Windows XP if I launch the terminal.exe (in normal mode) the File/Open Data Folder is pointing back to that folder where the terminal.exe is.
What I wanted to point out - if it is not obvious - is that there is no reason to bother with UAC until I need the portable mode.
Actually I did not notice that MQ recommend to avoid the portable mode, while they keep guiding people how to set it up. Anyway, I do not care what they recommend right now, I care about software to work properly. I definitively need all my customers to have it set temporarily, regardless of the system they run and the device they own.
Far beit from me to tell you what to do, but I think it is worth considering that if you require clients to use portable mode for the reason you need write access to the terminal dir when the terminal dir is in Program Files, your code could be broken by Windows 8 and probably other future versions of Windows.
If you read information on the MSDN site you will see MS has been telling developers since Vista, that writing to Program Files is a big no no place. They implemented UAC virtualization to provide compatability with older programs but instructed devlopers to assume virtualization is a temporary feature. Therfore assume to not code apps requiring access to protected locations because in future they will get acccess denied with no virtual Program Files to be diverted to.
Case in point being, you can't disable UAC in Windows 8 by simply turning it off like in previous versions. Even though it still has the never notify option in user account settings, it doesnt do the same thing as before. Previously it actually disabled UAC, in Windows 8 UAC is still active. Never notify now means, if an application tries to access protected locations, just dont tell me about it. Application fails. The result of that will be users will think they have turned UAC off and will not be informed they haven't, their apps will just fail to write to files in protected locations.
I believe there are ways to fully disable UAC in Win8 by editing the registry or group policy security settings, the problem with that is the average user is not going to know how or probably wont want to mess with it and they will have got used to leaving UAC alone because modern applications are coded to be UAC compliant, like the new MT4 is.
I found some additional information about this, I think under Windows 8 the user can still do "run as administrator" (if they have access to an adminstrator account). That "should" allow MT4 apps to gain write access to the Program Files dir, but I dont think MT4 itself will use anything but the new data folder structure because the data folder dir is defined during the install, not at runtime so if UAC is enabled, (as is pretty much a given in Win8) The data folder will be the new one.
I think this is something to check: According to the docs, like I just mentioned, the location of the data folder is defined during the install. If the user has UAC turned off when they install MT4 the data folder "should" be defined in the terminal dir. But if UAC is enabled during the install the data folder is created and defined seperately in the appdata dir. This means using the portable mode switch at runtime is not enough to make MT4 start using the terminal dir as it's data dir. It may only do that if it was installed that way. I haven't tested that I'm just going by what it says in the docs.
What I tried in win8.1 with the MT4 build 604: UAC was enabled, installed the MT4. The MT4 used the data folder properly with any UAC settings. If I turned the UAC completely off through Local Policies the same already installed MT4 used the terminal.exe folder as a data folder.
I am just trying to find "where" can I see my "unused" functions when I compile my source code in the new MQL editor... At moment, the "error tab" does not show them anymore.. Am I missing sth?
Really ? I must have got that wrong then too !! The docs describes how the terminal data folder is created during the install based on whether or not UAC is enabled and disabled, it doesnt say that check is made every time MT4 is launched and it doesnt say MT4 will revert to using the Program Files installation folder as the data folder when ever it can !! That is not good practice and contradicts MS documentaion. Applications should never try to write to files in protected locations anymore. That is a basic premise of post Vista Windows.
It also means if a user disables UAC for administrative reasons unrelated to MT4 for a period then turns UAC back on later, MT4 EA's could lose files they saved in the other location. Chart history could be saved in two locations. log files could be split between two locations, the same problem everyone had with UAC virtualization in pre 600 builds. Did you have to reboot Windows when you turned UAC off in local policies ? Did MT4 know how to find its custom indicators and EA's when they were previously in the appdata Data folder while UAC was turned on ?