2007-08-17 07:53:57 UTC
I'm developing an application that should move files from one
directory to another and insert records in a database about where the
file was moved and so on.
The problem is that the user shouldn't be able to delete or move back
the file that is once moved with the appliction therefore he won't
have permissions to open the destination directory with Explorer or
any other application. The obvious decision for my appliction is to
move the file in another user with permissions.
So my question is - How can I execute function MoveFile(LPCTSTR
lpszExisting, LPCTSTR lpszNew) as different user which will be created
on the XP machine for the application purposes ?