Well, I'm on XP, I'm old school
So no UAC for me, but, I do dual-boot &, I assume you're on 7? Depending on how you do it it'll differ at the end (eventghost, autoit etc). I'll try to make this as brief as possible.
Open up task scheduler, go to create task. I'll number the steps to hopefully make it easier
1. Give it a name you'll remember, under "name" (like xbmcdel or something). 2. Beneath that, in the general tab, make sure you check "Run with highest privileges". 3. Go to the "Actions" tab and click new, under "Action" put start a program. 4. Under "program/script" browser to your Unlocker.exe. 5. In "Add arguments" put the path to your xbmc log (in quotes) followed by -S -D (example above, in my post you quoted) 6. Click Ok, etc until you're back at the task scheduler screen, where there should be a new task (in this example, called xbmcdel) Right click it, and click "run" at this point it MIGHT pop up a UAC prompt, just agree to it, make sure it actually deleted the log file as well.
7. Now, right click anywhere, your desktop for example, and click new, shortcut. 8. Where it says type in the location of the item/browse, and type schtasks /run /tn "xbmcdel" (or whatever else you named it, name of the task in quotes) Click Next, give your shortcut a name, and click Finish. The whole point of that was to create a scheduled task, and a shortcut that points to the scheduled task. It might on first run, pop a UAC prompt, but after that it should do its thing no problem. Basically you'll want to point your exit command to run that shortcut.
If you use evenghost for example it'd be import os
os.startfile ("Path to shortcut")
Sorry for the long post, hope that helps you man
Works for me.
edit: I know you already use task scheduler, but for ease and to make sure there's not another error somewhere, just follow that ^ from top to bottom and you should be golden. There IS other ways if the above doesn't work, just let me know.
edit 2: Also, make sure on Unlocker, that run as administrator is NOT checked, let the scheduled task deal with the admin nonsense lol (as in, right click the exe, and make sure run as administrator, is unchecked)