how can i make programs think or hide that they are not running on wine?

Questions about Wine on Linux
Locked
Averi
Newbie
Newbie
Posts: 1
Joined: Wed May 31, 2023 4:47 am

how can i make programs think or hide that they are not running on wine?

Post by Averi »

hello, i was wondering if there is any way to trick programs running on wine that instead of it being wine but rather on windows?
any help would be appreciated!
qwertymnb
Level 4
Level 4
Posts: 236
Joined: Sun Jan 17, 2016 4:36 pm

Re: how can i make programs think or hide that they are not running on wine?

Post by qwertymnb »

Most of these "wine-aware" programs will likely check for wine specific functions like 'wine_get_version' or any other 'wine_*' function in ntdll. So the program's binary (which i call program.exe for now) likely contains the string 'wine_' in it's binary.
One trick that you might try is replace that string by another, so it will check for a non-existent function then:
"sed -i 's/wine_/fine_/g' program.exe" Make sure you first make a backup of the program.exe so you have a copy in case the exe gets screwed up!!
qwertymnb
Level 4
Level 4
Posts: 236
Joined: Sun Jan 17, 2016 4:36 pm

Re: how can i make programs think or hide that they are not running on wine?

Post by qwertymnb »

And forgot to mention, this check could of course also be present in one of the programs dlls, so better start with 'grep -r wine_ *' in the program's directory to see if and where the check is done
Locked