Win 7 Batch file needed

This is a discussion on Win 7 Batch file needed within the Windows Programming forums, part of the Platform Specific Boards category; Hi Can someone help me with a batch file that will delete the files in the c:/program Data/microsoft/windows/DRM folder on ...

  1. #1
    Registered User
    Join Date
    May 2011
    Posts
    3

    Win 7 Batch file needed

    Hi
    Can someone help me with a batch file that will delete the files in the c:/program Data/microsoft/windows/DRM folder on a Win 7 PC?
    Thanks in advance.
    Derek

  2. #2
    Registered User NeonBlack's Avatar
    Join Date
    Nov 2007
    Posts
    435
    This isn't a scripting forum.

    However,

    Code:
    rd /S "c:/program Data/microsoft/windows/DRM"
    should do it.
    I copied it from the last program in which I passed a parameter, which would have been pre-1989 I guess. - esbo

  3. #3
    Registered User
    Join Date
    May 2011
    Posts
    3
    Hi
    Thanks for the reply and I apologise for putting the post in the wrong forum. I have tried running the .bat file you wrote but it doesn't seem to delete the files in the DRM folder?

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    RD /S should work, IF you have permission to remove the entire folder tree. Did it ask for confirmation of the delete?

    try

    del "c:/program Data/microsoft/windows/DRM/*.*"

    But that will also fail if you lack the required permissions.

    Batch files - The DEL command
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  5. #5
    Registered User
    Join Date
    May 2011
    Posts
    3
    Hi
    The first one did ask to confirm whether to delete the files, the second didn't. The files are still there after the second one as well? I do have administrator rights on the PC so I am not sure why it's not doing the trick for me?
    Any ideas?
    Thanks again for your help.
    Derek

  6. #6
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    That's because Digital Rights Management is protected by the operating system... the files are probably flagged both Read Only and System ... I'd be surprised if they're not also flagged as Hidden...

    Code:
    cd "c:/program Data/microsoft/windows/DRM"
    attrib -s -h -r /s *.*
    del /s /q *.*
    AND... you may still get permissions errors...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Batch File? [Newbie help]
    By Shtick in forum C++ Programming
    Replies: 4
    Last Post: 12-12-2010, 10:28 AM
  2. Batch file
    By HunterCS in forum Tech Board
    Replies: 4
    Last Post: 05-19-2007, 01:21 AM
  3. Batch file or VisualBasic file to send to USB port
    By Rod McDevitt in forum Windows Programming
    Replies: 1
    Last Post: 03-28-2004, 03:09 AM
  4. I Need To Know Some Things That I Can Put Into A Batch File
    By TheRealNapster in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 10-20-2003, 09:12 PM
  5. Batch file?
    By Silentsharp in forum C++ Programming
    Replies: 1
    Last Post: 02-22-2002, 06:23 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21