I have a macro, provided by the wiki pages:BOOL WINAPI ReleaseMutex(
HANDLE hMutex
);
Upon reading the "Synchronization Object Security and Access Rights" page on MSDN, I noticed this:!macro MutexCheck _mutexname _outvar
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${_mutexname}") i .${_outvar} ?e'
pop ${_outvar}
!macroend
MUTEX_MODIFY_STATE (0x0001) Modify state access, which is required for the ReleaseMutex function.I need to change my macro to include this? So that the installer can modify it?
I'm also not exactly sure how to get the Handle of the Mutex. I'm guessing it's not simply it's name right?
The reason I want to release the Mutex, is that my installer creates two mutex's. One identical to the game I'm trying to patch (so they cannot run the game while trying to patch), and one of it's own, so the user can't run it twice. (reason there being two is that I can set a specific message depending on what the situation is.)
Anyways. At the finish page, I have the option to lauch said game I'm patching. The game won't lauch if it loads faster than the installer can close itself (almost always). So I want to release the Mutex in my Finish Page preFunction.
Thank you very much for your time in reading this.