[SOLVED] Writing a script to replace a .dll before and after launch

Hello, I’m kind of new to Lutris and I’m wondering if a certain type of script is possible. I want to replace a .dll in my game’s directory before launching it, and then after exiting the game, I want the .dll to be replaced back again. I know how to use simple mv commands in a bash script, but I’m not sure how to let it know that the program has exited to start the post script. On DOSBox, there’s the -exit command that tells the window to close when you’re finished with the game. Is there a similar command for Lutris that can also trigger a post-run script? Thanks

Hi,
As it’s DLLs, I’m assuming it is for something using a WINE runner.
Go into configuration, enable the “Advanced” slider at the top and then select “system options” - as if by magic, you’ll see pre and post script fields.
If it’s not, or more murky than that, you could always do it in a batch file and call that instead of the exe - e.g. the DosBox config - you can “call rungame.bat” where you do your DLL move then launch the exe.

This solved the problem for me. Thanks