It\'s possible, but is it appropriate to use SHFileOperation within a Windows service? All those SHxxx API functions in shell32.dll seem to have been written with user level pr
According to the SHFILEOPTSTRUCT documentation, you can use the following flags to prevent any UI from appearing:
FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR
or (if you're targeting Windows Vista), FOF_NO_UI
, which is the same as the above.
Looking in the ShellAPI.h
header file in the Windows SDK, the comment against FOF_NO_UI
says "don't display any UI at all", so from this I assume it's OK to use SHFileOperation
.