BOOL WINAPI GetVersionEx(LPOSVERSIONINFO lpVersionInfo) returns that OS is Vista


Why do you want to do this?How can I detect WINE from my program, or detect Linux, in other wors how can I detect  that OS is not Windows.
BOOL WINAPI GetVersionEx(LPOSVERSIONINFO lpVersionInfo) returns that OS is Vista Â![]()
Instead of tweaking your application, file bugs for wine so we can fixBecause WINE is not emulator  :D  When I detect WinXP I use one tuning, when WinVista I use other tuning, and I want to tuning my app for good work under WINE.
Well, I guess you could check if HKCU\Software\Wine exists ^^megapup wrote:Because WINE is not emulatorWhen I detect WinXP I use one tuning, when WinVista I use other tuning, and I want to tuning my app for good work under WINE.
It could be created on windows as well.megapup wrote:Well, I guess you could check if HKCU\Software\Wine exists ^^Because WINE is not emulator  :D  When I detect WinXP I use one tuning, when WinVista I use other tuning, and I want to tuning my app for good work under WINE.
Yes, that is a sure way to detect if you running on Wine.megapup wrote:I finded solution, just load kernel32.dll and try to find there function wine_get_unix_file_name()
I ckecked just now on wine 1.1.22 ubuntu 9.04, it works perfectly
The official answer is that you should not detect wine to use or not use functionality. Instead you should detect if functionality exists and use it when available. This should work on all versions of wine and windowsmajkl wrote:And unfortunatelly i cannot develope the project on wine, so i really need to detect wine and just not use this functionality.
[snip long answer]Its a double sided sword if wine is detectable why bother fixing wine bugs. Â If wine is reliability detectable applications developers have a simple path to exclude wine. Â Reason why we have to reserve the right to move any internal part as we see fit so in case of someone excluding wine we can counter.
You could help solve this problem since you appear to be a programmer.Hello,
at first i want to thank you, that at least someone answered, ive been looking for such detection - i also needed to tweak my application, because of wine does not support some functionality.
Secondly if someone would bother to update, fix or do something with it, it would be great. Now for the problem:
Its regarding UpdateLayeredWindow() function and transparency of the window. The problem is, that wine cannot show the window that uses alpha channel to specify transparency level for its every pixel.
You are correct in the statement that Z:\ does NOT exist with each andAgain presuming far too much andreaplanet if wine is sandbox by system security the Z:\ does not tell you go every where so any detection that path will fail.
Here is what we are trying to tell you and andreaplanet: Help us makeI was not talking about secuirty through obscurity as such. We provide a detect path we are able to limited so cannot remove it. If we find an attacker using a detect path we have to have the right to remove it we can limit the damage that can do. This is where the problem comes in with all the forms of detect so far. You are going to hook to something that we one day may remove. So then we get yelled at if we say do that.
There is a really dirty way to detect wine and it is the most dependable by the way. Try to run .exe.so if it runs it wine or another emulator base off wine. If it don't run it not wine or the wrong platform type. You can catch this failure by the way. Again can be secuirty filtered against to stop it from functional operation. You could also allow the file to be removed if missing going on as if you are on windows. So meeting our requirements. This kind of support is not going to be removed because someone decides to abuse detecting wine. We already have a built in counter measure. dll overrides settings. Flip the default if dll is not listed as builtin don't allow it to be loaded as builtin. So detect would be dead as door nail if we ever had to kill it. Yet restore able by altering winecfg libs for the application.
Basically at some point you many have to tell user how to enable the extras anyhow. So why not just be up front and ask them. Simpler by the way don't have to include .exe.so for linux bsd mac os solarias... Detecting wine is the hard path.
Also with a fully active Firewall & Antivirus (where every executable must be authorized manually by the end-user) a Windows system is mostly secure against attacks. But this is not the common case, that's why viruses and trojans are still doing damages on Windows.oiaohm wrote:Again presuming far too much andreaplanet if wine is sandbox by system security the Z:\ does not tell you go every where so any detection that path will fail.
Many small issues in Wine will never be fixed becauseoiaohm wrote:The complete idea that you have to add something to detect wine is wrong.
This is one of the reason why we don't want to. If you can detect wine what is you motivation to fix it. That simple. If you can detect wine most windows developers will do the same as you do on windows. Ok its wine run different block of code lets not bother fixing it no matter how simple.Many small issues in Wine will never be fixed because
- it's not worth (or)
- there are too few developers to fix everything (or)
- the wine community does not want to fix something by design (or)
- some issues are just impossible to fix due to technical reasons
But this attack will work on most Linux systems since by default I can run native programs. Like with Windows, viruses and trojans have a easy job on most Windows systems, but not on all.oiaohm wrote:andreaplanet what you describe as an attack don't work on all distributions out there.
Good to know. I could say the same for Windows. Just install the appropriate software for defending it.oiaohm wrote:Wine is currently left soft to be as friendly as we can. That can be changed over night if the need ever turns up. The hole only exists because the OS secuirty is turned down if its ever turned up those holes disappear.
So everyone who want to detect Wine must create his own exe.so? Ok, but if it is hardened through a sandbox then still can I run it? With a sandbox can I run a native linux binary distributed together with my application?oiaohm wrote:We already have a way to detect. Ie exe.so binaries. They only work on wine and its relations. Why duplicate.
First you say it is wrong to detect Wine, now you say let the user detect Wine (choose on which OS you are running).oiaohm wrote:Still no one has answered why you cannot just put a check box in the installer asking user are they on wine? It is the simplest solution. It why I am classing you arguments for so pointless.
Many small issues in Wine will never be fixed because
- it's not worth (or)
- there are too few developers to fix everything (or)
- the wine community does not want to fix something by design (or)
- some issues are just impossible to fix due to technical reasons
This is a good point. But you can't force developers to do that, also because there exists easy workarounds. Running a native binary, reading the environment. It's not that hard, maybe unreliable.oiaohm wrote:This is one of the reason why we don't want to. If you can detect wine what is you motivation to fix it. That simple. If you can detect wine most windows developers will do the same as you do on windows. Ok its wine run different block of code lets not bother fixing it no matter how simple.