How to set Windows Version as an environmental variable?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Post Reply
ToastyBug
Level 2
Level 2
Posts: 20
Joined: Tue Mar 11, 2025 2:02 pm

How to set Windows Version as an environmental variable?

Post by ToastyBug »

How do I set the Windows Version as an environmental variable or by prefixing it before the wine command in a terminal instead of using winecfg? Something like this:

Code: Select all

WINEWINDOWSVERSION=xp wine myprogram.exe
or

Code: Select all

export WINEWINDOWSVERSION=xp
wine myprogram.exe
User avatar
KenSharp
Level 4
Level 4
Posts: 149
Joined: Mon Jul 13, 2009 8:52 pm

Re: How to set Windows Version as an environmental variable?

Post by KenSharp »

You can't. You can use winetricks to make it easier.

If you're planning on reporting different Windows versions to different apps within the same wineprefix then you can't do that either. The details are stored in the registry. Use separate wineprefixes.
Post Reply