TempWmicBatchFile.bat is created by WMIC (Windows Management Instrumentation Command-line). You should be able to delete such files without problems.
"Desktop" and "My Documents" require OLE typically and function strangely if it isn't already initialised. Maybe a call to "::OleInitialize(NULL);" in your main code will help?
Bookmarks