View Single Post
Old 18-07-2008, 04:04 AM   #1 (permalink) Top
scorps65
Mega Geek
 
scorps65's Avatar
 
Join Date: Nov 2007
Age: 20 Male
Posts: 375
Times Helpful: 22
My Mood: Psychadelic
Status: Offline

My Computer

Exclamation .BAT program issue

In 2006, i created a very simple .BAT program to delete cookies, temporary files and so on....
I uploaded this 19kb .BAT file to DOWNLOAD.COM and got a 4 out of 5 from CNET and the same from a user!
Good news no? NOT REALLY. I got 2 users saying it deleted they're documents and all sorts of things!
Of course, they gave me a 1 out of 5 and lowered my score. It works fine on my pc though...

The questions is, i need someone who understands Command Prompt language and help me fix this error. Why does it delete absolutely everything on ones computer but work fine on another? Here's a sample of code from where the error seems to occur (Removing Junk Files)

Code:
ECHO                               Removing Junk Files

ECHO.

PING 127.0.0.1 /n 2 /w 1000 > NUL

TASKKILL /F /IM wdfmgr.exe

CD\
CD %ALLUSERSPROFILE%\Application Data\Microsoft\Dr Watson\
IF NOT EXIST "%ALLUSERSPROFILE%\Application Data\Microsoft\Dr Watson\" GOTO CD\
RD "." /S /Q

:CD\
CD %ALLUSERSPROFILE%\Application Data\Microsoft\Media Index\
IF NOT EXIST "%ALLUSERSPROFILE%\Application Data\Microsoft\Media Index\" GOTO CD\
DEL wmplibrary_v_0_12.db /Q

:CD\
CD %ALLUSERSPROFILE%\Application Data\Microsoft\MSDAIPP\Offline\
IF NOT EXIST "%ALLUSERSPROFILE%\Application Data\Microsoft\MSDAIPP\Offline\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\
IF NOT EXIST "%SYSTEMROOT%\schedlgu.txt" GOTO CD\
DEL schedlgu.txt /Q

:CD\
CD %SYSTEMROOT%\Debug\
IF NOT EXIST "%SYSTEMROOT%\Debug\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\Downloaded Installations\
IF NOT EXIST "%SYSTEMROOT%\Downloaded Installations\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\Downloaded Program Files\
IF NOT EXIST "%SYSTEMROOT%\Downloaded Program Files\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\Minidump\
IF NOT EXIST "%SYSTEMROOT%\Minidump\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\msdownld.tmp\
IF NOT EXIST "%SYSTEMROOT%\msdownld.tmp\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\PCHEALTH\HELPCTR\Config\Cache\
IF NOT EXIST "%SYSTEMROOT%\PCHEALTH\HELPCTR\Config\Cache\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\PCHEALTH\HELPCTR\Logs\
IF NOT EXIST "%SYSTEMROOT%\PCHEALTH\HELPCTR\Logs\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\PCHEALTH\HELPCTR\OfflineCache\
IF NOT EXIST "%SYSTEMROOT%\PCHEALTH\HELPCTR\OfflineCache\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\PCHEALTH\HELPCTR\Temp\
IF NOT EXIST "%SYSTEMROOT%\PCHEALTH\HELPCTR\Temp\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\Prefetch\
IF NOT EXIST "%SYSTEMROOT%\Prefetch\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\system32\Cache\
IF NOT EXIST "%SYSTEMROOT%\system32\Cache\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\system32\config\systemprofile\Cookies\
IF NOT EXIST "%SYSTEMROOT%\system32\config\systemprofile\Cookies\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\system32\config\systemprofile\Local Settings\History\
IF NOT EXIST "%SYSTEMROOT%\system32\config\systemprofile\Local Settings\History\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\system32\config\systemprofile\Local Settings\Temp\
IF NOT EXIST "%SYSTEMROOT%\system32\config\systemprofile\Local Settings\Temp\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\system32\config\systemprofile\Local Settings\Temporary Internet Files\
IF NOT EXIST "%SYSTEMROOT%\system32\config\systemprofile\Local Settings\Temporary Internet Files\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\system32\config\systemprofile\Recent\
IF NOT EXIST "%SYSTEMROOT%\system32\config\systemprofile\Recent\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\system32\wbem\Logs\
IF NOT EXIST "%SYSTEMROOT%\system32\wbem\Logs\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\Temp\
IF NOT EXIST "%SYSTEMROOT%\Temp\" GOTO CD\
RD "." /S /Q

:CD\
CD %USERPROFILE%\Application Data\Microsoft\Office\Recent\
IF NOT EXIST "%USERPROFILE%\Application Data\Microsoft\Office\Recent\" GOTO CD\
RD "." /S /Q

:CD\
CD %USERPROFILE%\Application Data\Sun\Java\Deployment\cache\javapi\v1.0\file\
IF NOT EXIST "%USERPROFILE%\Application Data\Sun\Java\Deployment\cache\javapi\v1.0\file\" GOTO CD\
RD "." /S /Q

:CD\
CD %USERPROFILE%\Application Data\Sun\Java\Deployment\cache\javapi\v1.0\jar\
IF NOT EXIST "%USERPROFILE%\Application Data\Sun\Java\Deployment\cache\javapi\v1.0\jar\" GOTO CD\
RD "." /S /Q

:CD\
CD %USERPROFILE%\Application Data\Sun\Java\Deployment\cache\javapi\v1.0\tmp\
IF NOT EXIST "%USERPROFILE%\Application Data\Sun\Java\Deployment\cache\javapi\v1.0\tmp\" GOTO CD\
RD "." /S /Q

:CD\
CD %USERPROFILE%\Application Data\Sun\Java\Deployment\cache\tmp\
IF NOT EXIST "%USERPROFILE%\Application Data\Sun\Java\Deployment\cache\tmp\" GOTO CD\
RD "." /S /Q

:CD\
CD %USERPROFILE%\Application Data\Sun\Java\Deployment\tmp\
IF NOT EXIST "%USERPROFILE%\Application Data\Sun\Java\Deployment\cache\tmp\" GOTO CD\
RD "." /S /Q

:CD\
CD %USERPROFILE%\Cookies\
IF NOT EXIST "%USERPROFILE%\Cookies\" GOTO CD\
RD "." /S /Q

:CD\
CD %USERPROFILE%\Local Settings\Application Data\
IF NOT EXIST "%USERPROFILE%\Local Settings\Application Data\IconCache.db" GOTO CD\
DEL IconCache.db /Q

:CD\
CD %USERPROFILE%\Local Settings\History\
IF NOT EXIST "%USERPROFILE%\Local Settings\History\" GOTO CD\
RD "." /S /Q

:CD\
CD %USERPROFILE%\Local Settings\Temporary Internet Files\
IF NOT EXIST "%USERPROFILE%\Local Settings\Temporary Internet Files\" GOTO CD\
RD "." /S /Q

:CD\
CD %USERPROFILE%\Recent\
IF NOT EXIST "%USERPROFILE%\Recent\" GOTO CD\
RD "." /S /Q

:CD\
CD %USERPROFILE%\UserData\
IF NOT EXIST "%USERPROFILE%\UserData\" GOTO CD\
RD "." /S /Q

:CD\
CD \DOCUME~1\Default User\Cookies\
IF NOT EXIST "\DOCUME~1\Default User\Cookies\" GOTO CD\
RD "." /S /Q

:CD\
CD \DOCUME~1\Default User\Local Settings\History\
IF NOT EXIST "\DOCUME~1\Default User\Local Settings\History\" GOTO CD\
RD "." /S /Q

:CD\
CD \DOCUME~1\Default User\Local Settings\Temp\
IF NOT EXIST "\DOCUME~1\Default User\Local Settings\Temp\" GOTO CD\
RD "." /S /Q

:CD\
CD \DOCUME~1\Default User\Local Settings\Temporary Internet Files\
IF NOT EXIST "\DOCUME~1\Default User\Local Settings\Temporary Internet Files\" GOTO CD\
RD "." /S /Q

:CD\
CD \DOCUME~1\Default User\Recent\
IF NOT EXIST "\DOCUME~1\Default User\Recent\" GOTO CD\
RD "." /S /Q

:CD\
CD \DOCUME~1\Guest\Application Data\Microsoft\Office\Recent\
IF NOT EXIST "\DOCUME~1\Guest\Application Data\Microsoft\Office\Recent\" GOTO CD\
RD "." /S /Q

:CD\
CD \DOCUME~1\Guest\Cookies\
IF NOT EXIST "\DOCUME~1\Guest\Cookies\" GOTO CD\
RD "." /S /Q

:CD\
CD \DOCUME~1\Guest\Local Settings\Application Data\
IF NOT EXIST "\DOCUME~1\Guest\Local Settings\Application Data\IconCache.db" GOTO CD\
DEL IconCache.db /Q

:CD\
CD \DOCUME~1\Guest\Local Settings\History\History.IE5\
IF NOT EXIST "\DOCUME~1\Guest\Local Settings\History\History.IE5\" GOTO CD\
RD "." /S /Q

:CD\
CD \DOCUME~1\Guest\Local Settings\Temp\
IF NOT EXIST "\DOCUME~1\Guest\Local Settings\Temp\" GOTO CD\
RD "." /S /Q

:CD\
CD \DOCUME~1\Guest\Local Settings\Temporary Internet Files\Content.IE5\
IF NOT EXIST "\DOCUME~1\Guest\Local Settings\Temporary Internet Files\Content.IE5\" GOTO CD\
RD "." /S /Q

:CD\
CD \DOCUME~1\Guest\Recent\
IF NOT EXIST "\DOCUME~1\Guest\Recent\" GOTO CD\
RD "." /S /Q

:CD\
CD %SYSTEMROOT%\system32\wdfmgr.exe

CLS

__________________

  Reply With Quote
Whats this? Wireless Optical Black Desktop 1000
Wireless Optical Black Desktop 1000
Seller Price (inc. VAT) Delivery Total Price Availability Seller Rating
euroffice £35.24 £4.64 £39.88 In Stock Rated: 4 out of 5 - Number of votes: 26
Misco.co.uk £26.99 £5.86 £32.85 In Stock Rated: 4 out of 5 - Number of votes: 1354
Tekheads.co.uk £24.99 £4.95 £29.94 In Stock Rated: 3 out of 5 - Number of votes: 310