Thank you for your reply, Arjay. It turns out that Avast's File System Protection was blocking the commands. I turned of the protection temporarily and the application ran as desired.