gregfx Posted October 25, 2006 Posted October 25, 2006 (edited) Hi,I'm having a little trouble getting a cleanup.cmd to run correctly. What I have done is copy a range of batch codes to the desktop to run certain programs from my install directory(which is in my sysprep folder) if the customer requires them. What I then wanted to do was run sysprep with a cleanup.cmd file to wipe the batch files from the desktop when the end user fires up the machine.The batch files remained after testing on a virtual PC. So I just added pause to the cmd file to see what was happening and I'm getting an access denied error for all users:This is my cleanup.cmd file. It's very basic but suits what I need to do which is just dump around 6 batch files.cmdow @ /HIDDEL "%AllUsersProfile%\Desktop\"*".bat"EXITCan anyone tell me where I'm missing something? Do I need to add access privileges somewhere? ThanksGregEditLittle more of the puzzle is clearer. Unchecking read only off the All Users directory obviously solves the problem. How then can I set up a .cmd file to uncheck the directory for read only and then when the end userfires up the machine that all correct Windows directory functions are in place? Or is there an easier way to accomplish what I'm trying to do? Edited October 25, 2006 by gregfx
mazin Posted October 25, 2006 Posted October 25, 2006 This should work: DEL /f /q /a "%AllUsersProfile%\Desktop\*.bat"
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now