Test it with psexec -s to run under system context. This will match what ConfigMgr will attempt to do.
Another thought is you need to have the rmdir switches before your directory path. Rmdir /q "c:\program files\etc\etc" Daniel Ratliff From: [email protected] [mailto:[email protected]] On Behalf Of Jeff Poling Sent: Thursday, August 08, 2013 11:58 AM To: [email protected] Subject: Re: [mssms] Batch Script That is a possibility. . .although I can run the script on its own and it deletes the directory every time. On Thu, Aug 8, 2013 at 10:36 AM, Tuomo Leppänen <[email protected]<mailto:[email protected]>> wrote: If the msiexec is still running when you try to remove that directory? On 8.8.2013 18:35, Jeff Poling wrote: I am feeling pretty lame that I cannot get this to work. . . . I have a batch file I am distributing with ConfigMgr 2007. The purpose of the batch file is to uninstall some software. It does this using msiexec commands and then some misc deletion of registry entries. I also need to remove the empty program directory from c:\program files (x86). Removing the directory is not working when the program runs on the client. If I run the script on its own outside of ConfigMgr, the folder gets removed with no issue. I've tried a number of renditions. Here is the line from the script I am using to delete the folder: CMD.exe /c rmdir /s "C:\Program Files (x86)\Interwoven" /q Any idea why that line does not work when ConfigMgr runs the program? Thanks, Jeff The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information.

