MSFN Forum: Cleanup.cmd question - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cleanup.cmd question Rate Topic: -----

#1 User is offline   gregfx 

  • Group: Members
  • Posts: 4
  • Joined: 18-October 06

Posted 25 October 2006 - 03:33 PM

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:

This post has been edited by gregfx: 25 October 2006 - 03:59 PM



#2 User is offline   mazin 

  • MSFN Addict
  • Group: Supreme Sponsor
  • Posts: 1,952
  • Joined: 12-January 04

Posted 25 October 2006 - 04:30 PM

This should work: DEL /f /q /a "%AllUsersProfile%\Desktop\*.bat"

#3 User is offline   gregfx 

  • Group: Members
  • Posts: 4
  • Joined: 18-October 06

Posted 25 October 2006 - 04:43 PM

Thanks Mazin,

works a treat :)

Greg

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy