How to shutdown MM with script
Posted: Sun May 03, 2020 3:41 am
I know the thread here ( http://www.mediamonkey.com/forum/viewto ... 15#p241015 ) is 10 years old but I need to be able to shutdown MM4 via a script (or external program) and the simple script below isn't working. I've verified no instances of MM4 are already running including the service and the SDBApplication::ShutdownAfterDisconnect is still referenced in the documentation ( https://www.mediamonkey.com/wiki/index. ... Disconnect ). I've tried this in a .vbs and Windows Application and MM4 will start but not shutdown.
Should this still work or am I missing something else i need to set perhaps in the MM4 Options or elsewhere?
Should this still work or am I missing something else i need to set perhaps in the MM4 Options or elsewhere?
Code: Select all
Dim SDB
Set SDB = CreateObject( "SongsDB.SDBApplication")
SDB.ShutdownAfterDisconnect = True
' put the above code in a vbs file called ShutdownMM.vbs file
'set it to run at a certian time in the task scheduler.
'it will stop all media monkey fuctions at once when ran. so give it a minute to finish mm fuctions.
'it can be run by a shortcut also.