Jump to content

Recommended Posts

Posted (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 @ /HID

DEL "%AllUsersProfile%\Desktop\"*".bat"

EXIT

Can anyone tell me where I'm missing something? Do I need to add access privileges somewhere? :}

Thanks

Greg

Edit

Little 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 user

fires 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? :blink:

Edited by gregfx

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...