How can an app detect it's running under WINE?

Andreas Mohr andi at
Fri Oct 25 06:22:22 CDT 2002

On Fri, Oct 25, 2002 at 10:30:15AM +0200, Alberto Massari wrote:
> Hi Andreas,
> At 03.12 25/10/2002 -0500, you wrote:
> >Message: 13
> >Date: Fri, 25 Oct 2002 10:10:32 +0200
> >From: Andreas Mohr <andi at>
> >To: Alberto Massari <alby at>
> >Cc: wine-devel at
> >Subject: Re: How can an app detect it's running under WINE?
> >Reply-To: andi at
> >
> >On Fri, Oct 25, 2002 at 09:25:23AM +0200, Alberto Massari wrote:
> >> Hi everybody,
> >> I am working on making our software (Stylus Studio,
> >> run under WINE, if this is feasible. To
> >> achieve this, I have already implemented a bunch of APIs (the application
> >> is built against the UNICODE version of the Win32 APIs) and fixed some 
> >bugs
> >> I hit (I already mailed the first patch to wine-patches at
> >>
> >> However, I would feel better if I could detect I am running under WINE 
> >and
> >> gracefully disable some functionalities that are not yet fully supported;
> >> is there any way to achieve this? Is there a WIN32 API (like, say,
> >> GetVersionEx) that can return a string like "Windows 2000 (WINE)" or is
> >> WINE trying to be as stealth as possible?
> > would have been answering this in countless
> >cases already.
> I'm sorry I asked this here, but the only help I got from the FAQ was:
> ------
> Q: How can I detect Wine?
> A: You really shouldn't want to do this. If there's a quirk in Wine you 
> need to work around, it's *much* better to fix it in Wine (after all you're 
> a developer, so you should be able to gather enough help and knowledge to 
> fix it for real).
> If you think you really want to know how to detect it anyway (maybe in 
> order to just have a cool "running on Wine" status text or so), then please 
> mail me.
> (address-suppressed)
> ------
> So I though I could ask it here....
Argh !
That "(address-suppressed)" wasn't meant to be like that from the beginning...

Originally that part showed my email address.

Thanks for notifying me about this issue !

So yes, your posting is pretty much very justified after all.

Like someone else said (IIRC), you could check for the existence
of the Wine configuration registry key branch. That'd be a 150% reliable
method of detecting Wine presence.

But again, trying to fix issues would be preferrable.
(unless there are just too many problems to be fixed)

Andreas Mohr

More information about the wine-devel mailing list