Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Please check my cmd script

    I tried to use the following cmd script to delete the TIF, History, and Cookies/index.dat files on a Win2K box that is used by several users. I used the Group Policy Editor to place this "cleanup.cmd" in the Startup Scripts area. When I re-booted, the computer got to a spot where it said "Running Startup Scripts" and then froze -- so I suspect I have made a mistake -- and probably a stupid one. Perhaps I cannot use the "full path names" in quotes??

    Could you guys look this over and see if you see anything blatantly wrong? Thanks.

    --------------------------------------------------------------------------------

    cd
    cd "Cocuments and SettingsDefault UserCookies"
    del /f/p index.dat
    cd
    cd "Cocuments and SettingsAdministratorCookies"
    del /f/p index.dat
    cd
    cd "Cocuments and SettingsDanielCookies"
    del /f/p index.dat
    cd
    cd "Cocuments and SettingsAdministrator.PMSTATCookies"
    del /f/p index.dat
    cd
    cd "Cocuments and SettingsUSER8Cookies"
    del /f/p index.dat
    cd
    cd "Cocuments and SettingsRickCookies"
    del /f/p index.dat
    cd
    cd "Cocuments and SettingsAdministratorApplication DataMicrosoftInternet ExplorerUserData"
    del /f/p index.dat
    cd
    cd "Cocuments and SettingsDanielApplication DataMicrosoftInternet ExplorerUserData"
    del /f/p index.dat
    cd
    cd "Cocuments and SettingsRickUserData"
    del /f/p index.dat
    cd

    cd "Cocuments and SettingsDefault UserLocal Settings"
    rd /s/p locals~1history
    rd /s/p tempor~1
    cd
    cd "Cocuments and SettingsAdministratorLocal Settings"
    rd /s/p history
    rd /s/p tempor~1
    cd
    cd "Cocuments and SettingsDanielLocal Settings"
    rd /s/p history
    rd /s/p tempor~1
    cd
    cd "Cocuments and SettingsAdministrator.PMSTATLocal Settings"
    rd /s/p history
    rd /s/p tempor~1
    cd
    cd "Cocuments and SettingsUSER8Local Settings"
    rd /s/p history
    rd /s/p tempor~1
    cd
    cd "Cocuments and SettingsRickLocal Settings"
    rd /s/p history
    rd /s/p tempor~1
    cd
    exit

  2. #2
    Lounger
    Join Date
    Jul 2002
    Location
    Melbourne, Victoria, Australia
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Please check my cmd script

    I have a vbs script that might do the trick. You'll have to modify it for your needs but it's pretty self explanatory. You'll need to rename it to .vbs as it won't let me upload .vbs files
    Attached Files Attached Files

  3. #3
    Lounger
    Join Date
    Jul 2002
    Location
    Melbourne, Victoria, Australia
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Please check my cmd script

    One thing i've noticed is that you are using the /p switch that is used to prompt before deletion. This may be causing the problems, I would try using /q which deletes in quiet mode i.e. doesn't ask for confirmation before deleting. Also you are using rd /p which I don't think exists try /q again this is quiet mode

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Please check my cmd script

    Thanks. I wanted it to "Prompt" me the first time I ran it.

    DEL has the /p switch, but RD does not.

    That just might be the problem!!! Thank you so much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •