Jump to content


Photo
- - - - -

Batch script for deleting AMD and NVIDIA remnants


  • Please log in to reply
9 replies to this topic

#1 El_Capitan

El_Capitan

    Even the sun goes down

  • Members
  • PipPipPipPipPipPip
  • 6680 posts
  • Gender:Male
  • Location:Somerville, MA

Posted 18 July 2014 - 07:30 AM

This script is only for cleaning your system AFTER you uninstall all your graphics drivers on a Windows machine (optimized for Windows 7 x64, but it will most likely work on XP and Windows 8). It searches for existing AMD and NVIDIA folders, and any leftover registry trees. If it finds them, then it will delete them. There are 3 things you need to do after you copy/paste the below code to a text file:

 

1. Replace all "El_Capitan" occurrences with your OS login name. The best way to do this is go to C:\users and then find your login name.

 

2b1617.jpg

 

2. Rename your .txt file with a .bat extension.

608994.jpg

 

Once you rename it, you might get a prompt:

d19ca3.jpg

 

That's fine. Go ahead and click "Yes".

 

3. Now all you have to do to run it is right-click on it, and click "Run as administrator".

2b1a46.jpg

 

That's it!

 

Below is the script code:

IF EXIST "C:\AMD" (
    rmdir "C:\AMD" s q
)
IF EXIST "C:\ATI" (
    rmdir "C:\ATI" s q
)
IF EXIST "C:\NVIDIA" (
    rmdir "C:\NVIDIA" s q
)
IF EXIST "C:\ProgramData\AMD" (
    rmdir "C:\ProgramData\AMD" s q
)
IF EXIST "C:\ProgramData\ATI" (
    rmdir "C:\ProgramData\ATI" s q
)
IF EXIST "C:\ProgramData\NVIDIA" (
    rmdir "C:\ProgramData\NVIDIA" s q
)
IF EXIST "C:\ProgramData\NVIDIA Corporation" (
    rmdir "C:\ProgramData\NVIDIA Corporation" s q
)
IF EXIST "C:\Program Files\AMD" (
    rmdir "C:\Program Files\AMD" s q
)
IF EXIST "C:\Program Files\ATI" (
    rmdir "C:\Program Files\ATI" s q
)
IF EXIST "C:\Program Files\ATI Technologies" (
    rmdir "C:\Program Files\ATI Technologies" s q
)
IF EXIST "C:\Program Files\NVIDIA Corporation" (
    rmdir "C:\Program Files\NVIDIA Corporation" s q
)
IF EXIST "C:\Program Files (x86)\AMD" (
    rmdir "C:\Program Files (x86)\AMD" s q
)
IF EXIST "C:\Program Files (x86)\AMD APP" (
    rmdir "C:\Program Files (x86)\AMD APP" s q
)
IF EXIST "C:\Program Files (x86)\AMD AVT" (
    rmdir "C:\Program Files (x86)\AMD AVT" s q
)
IF EXIST "C:\Program Files (x86)\ATI Technologies" (
    rmdir "C:\Program Files (x86)\ATI Technologies" s q
)
IF EXIST "C:\Program Files (x86)\NVIDIA Corporation" (
    rmdir "C:\Program Files (x86)\NVIDIA Corporation" s q
)
IF EXIST "C:\Users\El_Capitan\AppData\Local\AMD" (
    rmdir "C:\Users\El_Capitan\AppData\Local\AMD" s q
)
IF EXIST "C:\Users\El_Capitan\AppData\Local\ATI" (
    rmdir "C:\Users\El_Capitan\AppData\Local\ATI" s q
)
IF EXIST "C:\Users\El_Capitan\AppData\Local\NVIDIA" (
    rmdir "C:\Users\El_Capitan\AppData\Local\NVIDIA" s q
)
IF EXIST "C:\Users\El_Capitan\AppData\Local\NVIDIA Corporation" (
    rmdir "C:\Users\El_Capitan\AppData\Local\NVIDIA Corporation" s q
)
IF EXIST "C:\Users\El_Capitan\AppData\Roaming\AMD" (
    rmdir "C:\Users\El_Capitan\AppData\Roaming\AMD" s q
)
IF EXIST "C:\Users\El_Capitan\AppData\Roaming\ATI" (
    rmdir "C:\Users\El_Capitan\AppData\Roaming\ATI" s q
)
IF EXIST "C:\Users\El_Capitan\AppData\Roaming\NVIDIA" (
    rmdir "C:\Users\El_Capitan\AppData\Roaming\NVIDIA" s q
)
reg delete "HKEY_CURRENT_USER\SOFTWARE\AMD" /f
reg delete "HKEY_CURRENT_USER\SOFTWARE\ATI" /f
reg delete "HKEY_CURRENT_USER\SOFTWARE\NVIDIA" /f
reg delete "HKEY_CURRENT_USER\SOFTWARE\NVIDIA Corporation" /f
reg delete "HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\AMD" /f
reg delete "HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\ATI" /f
reg delete "HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\NVIDIA" /f
reg delete "HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\NVIDIA Corporation" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\AMD" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\ATI" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\ATI Technologies" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AMD" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ATI" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ATI Technologies" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\NVIDIA" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\NVIDIA Corporation" /f
reg delete "HKEY_USERS\S-1-5-18\SOFTWARE\AMD" /f
reg delete "HKEY_USERS\S-1-5-18\SOFTWARE\ATI" /f
reg delete "HKEY_USERS\S-1-5-18\SOFTWARE\NVIDIA" /f
reg delete "HKEY_USERS\S-1-5-18\SOFTWARE\NVIDIA Corporation" /f
reg delete "HKEY_USERS\S-1-5-18\SOFTWARE\Wow6432Node\AMD" /f
reg delete "HKEY_USERS\S-1-5-18\SOFTWARE\Wow6432Node\ATI" /f
reg delete "HKEY_USERS\S-1-5-18\SOFTWARE\Wow6432Node\NVIDIA" /f
reg delete "HKEY_USERS\S-1-5-18\SOFTWARE\Wow6432Node\NVIDIA Corporation" /f
reg delete "HKEY_USERS\S-1-5-19\SOFTWARE\AMD" /f
reg delete "HKEY_USERS\S-1-5-19\SOFTWARE\ATI" /f
reg delete "HKEY_USERS\S-1-5-19\SOFTWARE\NVIDIA" /f
reg delete "HKEY_USERS\S-1-5-19\SOFTWARE\NVIDIA Corporation" /f
reg delete "HKEY_USERS\S-1-5-19\SOFTWARE\Wow6432Node\AMD" /f
reg delete "HKEY_USERS\S-1-5-19\SOFTWARE\Wow6432Node\ATI" /f
reg delete "HKEY_USERS\S-1-5-19\SOFTWARE\Wow6432Node\NVIDIA" /f
reg delete "HKEY_USERS\S-1-5-19\SOFTWARE\Wow6432Node\NVIDIA Corporation" /f
reg delete "HKEY_USERS\S-1-5-20\SOFTWARE\AMD" /f
reg delete "HKEY_USERS\S-1-5-20\SOFTWARE\ATI" /f
reg delete "HKEY_USERS\S-1-5-20\SOFTWARE\NVIDIA" /f
reg delete "HKEY_USERS\S-1-5-20\SOFTWARE\NVIDIA Corporation" /f
reg delete "HKEY_USERS\S-1-5-20\SOFTWARE\Wow6432Node\AMD" /f
reg delete "HKEY_USERS\S-1-5-20\SOFTWARE\Wow6432Node\ATI" /f
reg delete "HKEY_USERS\S-1-5-20\SOFTWARE\Wow6432Node\NVIDIA" /f
reg delete "HKEY_USERS\S-1-5-20\SOFTWARE\Wow6432Node\NVIDIA Corporation" /f
reg delete "HKEY_USERS\S-1-5-21-3701762574-1144279690-470671874-1000\SOFTWARE\AMD" /f
reg delete "HKEY_USERS\S-1-5-21-3701762574-1144279690-470671874-1000\SOFTWARE\ATI" /f
reg delete "HKEY_USERS\S-1-5-21-3701762574-1144279690-470671874-1000\SOFTWARE\NVIDIA" /f
reg delete "HKEY_USERS\S-1-5-21-3701762574-1144279690-470671874-1000\SOFTWARE\NVIDIA Corporation" /f


#2 ccokeman

ccokeman

    Frank <3 Reesa

  • Reviewer
  • PipPipPipPipPipPipPip
  • 11516 posts
  • Gender:Male

Posted 19 July 2014 - 08:39 AM

Will have to try this out.


Processor Intel Core I7 920 @ 3.6
Memory Mushkin 998995 Blackline 12GB 9-9-9-24
Motherboard MSI X58 Big Bang
Graphics ASUS GTX 580
Power Corsair AX 1200,
Monitor Gateway UXD3000, LG W3000H, ASUS VG236 x 3
Water Cooling By DangerDen & Swiftech
Follow OCC on Posted Image

#3 IVIYTH0S

IVIYTH0S

    They call me... General Help.

  • Members
  • PipPipPipPipPipPipPipPip
  • 20681 posts
  • Gender:Male
  • Location:Pennsauken, NJ

Posted 19 July 2014 - 09:04 AM

Nice... I've been using Everything to just find any AMD or ATI folder and deleting that along with Driver sweeper and an official uninstall


"GilliumX58" DESKTOP
Mobo: Asus P8Z68-V-PRO | Processor: Intel Core i7 2600K @ 4.6ghz | CPU Cooler: Zalman CNPS9900MAXR | Videocard: MSI Twin Frozr HD7970
Memory: Patriot 8GB 1600mhz | OS SSD: SanDisk Extreme 240GB SATA | PSU: PC Power & Cooling Silencer 750W
Monitor: Samsung 30" 305T | CD/DVD: Samsung SH-S223F | Keyboard: Razer Tarantula | Mouse: Razer Lachesis

OCC Cool Club Member

 
 

 

GPU Comparison tool on AnAndTech


#4 ivangela

ivangela

    Professional Student

  • Folding Member
  • 670 posts
  • Gender:Male
  • Location:PA, USA

Posted 19 July 2014 - 11:20 AM

I tried to update my Nvidia drivers a while ago and it hung. Since then the ico in the sys tray has an ! saying there is an updated version of said drivers, but any attempt to update them hangs so I just haven't done it.

If you think i can uninstall my graphics dirvers, run this and then reinstall the updated drivers, I'll give it a shot.

What say ya'll?


HTPC......Phenom II X4 940 BE @ 3.38.....AC Freezer 64 Pro......ASUS M4A79 Deluxe......2x2GB OCZ Platinum 1066......ASUS EN9500GT......Corsair CX430 PSU......WD Caviar Black 640GB and 1 TB......LG SuperMulti Blu-ray......Silverstone Black HTPC case
 

New Rig....i7 3770K (stock for now)....CM Hyper 212 Evo....ASrock Z77 Extreme4....16GB Crucial Ballistix Sport 2x8GB....XFX Black Edition 7770....Mushkin 550W modular....Corsair Force GS 240GB SSD....2x640GB WD Black....CM Storm Scout 2

 
sigimage.gif
 
"wealth...that first and greatest of all the forces within the grasp of man" Dumas


#5 IVIYTH0S

IVIYTH0S

    They call me... General Help.

  • Members
  • PipPipPipPipPipPipPipPip
  • 20681 posts
  • Gender:Male
  • Location:Pennsauken, NJ

Posted 19 July 2014 - 02:17 PM

I tried to update my Nvidia drivers a while ago and it hung. Since then the ico in the sys tray has an ! saying there is an updated version of said drivers, but any attempt to update them hangs so I just haven't done it.
If you think i can uninstall my graphics dirvers, run this and then reinstall the updated drivers, I'll give it a shot.
What say ya'll?

should work, i assume you're doing an auto update via the geforce experience thing?

"GilliumX58" DESKTOP
Mobo: Asus P8Z68-V-PRO | Processor: Intel Core i7 2600K @ 4.6ghz | CPU Cooler: Zalman CNPS9900MAXR | Videocard: MSI Twin Frozr HD7970
Memory: Patriot 8GB 1600mhz | OS SSD: SanDisk Extreme 240GB SATA | PSU: PC Power & Cooling Silencer 750W
Monitor: Samsung 30" 305T | CD/DVD: Samsung SH-S223F | Keyboard: Razer Tarantula | Mouse: Razer Lachesis

OCC Cool Club Member

 
 

 

GPU Comparison tool on AnAndTech


#6 Waco

Waco

    Lab Rat 2

  • Reviewer
  • PipPipPipPipPipPipPipPip
  • 15462 posts
  • Gender:Male
  • Location:Los Alamos, NM

Posted 19 July 2014 - 03:30 PM

Forgive me if this comes off wrong...but what's wrong with driver sweeper in safe mode?

sig.png

GTX 770 replaced with watercooled GTX780...but too lazy to change the sig.


#7 El_Capitan

El_Capitan

    Even the sun goes down

  • Members
  • PipPipPipPipPipPip
  • 6680 posts
  • Gender:Male
  • Location:Somerville, MA

Posted 19 July 2014 - 06:03 PM

Forgive me if this comes off wrong...but what's wrong with driver sweeper in safe mode?

I use the latest Driver Sweeper (which is now Driver Fusion), and CCleaner. I've found it doesn't get rid of everything. The surest way is to double check these locations, and manually delete them. That could take a few minutes if you don't know where to look. This script will do it in a second.



#8 cjloki

cjloki

    Demigod

  • Donated T5
  • PipPipPipPipPip
  • 3070 posts
  • Gender:Male
  • Location:Riverside CA.

Posted 20 July 2014 - 05:15 AM

is all this because of video cards i sent you ? and did it work ?... i worry about such things...can you tell ?


#1) ASUS F2A85-V PRO+AMD 6800k@4.7ghz,Corsair H100,20gb Crucial Ballistix ddr3 1600@1866,xfx7970 Black,GTX650 physx,2x128gb vertex4's raid0,2x600gb WD velociraptors,Sony OptiarcDVD rw,Antec1200 Full tower,Coolmax cug-950,w8pro64, gaming

#2) ASUS rampage formula+qx9770@4ghz, Corsair h100, 4gb ocz 1200, twin cav black 500's raid/0, CF 2x6870, corsair 750, custom DIY coolermaster glite mid tower, Sony OptiarcDVD, w7pro64, main office/server/gamin

#3) Gigabyte p55ud5+I-7 875k@2.93turbo, 4g gskill PIS 2200, nvidia gt520, corsair h50, samsung f3 1tb, lg supermultiDVD, coolermaster 500w psu, raidmax sieran, win8pro64 clone, strictly folding 15k-30k ppd 

Bloodbath

 Warweeny: " just let it go, be free and relax ! "

 


#9 wevsspot

wevsspot

    The Pain of Being a Razorback Fan.....

  • Moderator
  • PipPipPipPipPipPipPipPip
  • 16002 posts
  • Gender:Male
  • Location:NW Arkansas

Posted 22 July 2014 - 10:21 AM

Thanks Cappy.  I'll give your script a try next time I have to re-do gpu drivers.  Consider me "subscribed" to this thread  :)


10804750996_f1dd23d20e_o.jpg

 


#10 Minime 939

Minime 939

    New Member

  • Members
  • 37 posts
  • Gender:Male
  • Location:Colorado, USA

Posted 22 July 2014 - 12:09 PM

Hey El_Capitan,

 

Is it possible that I don't have an OS login name?  I can't find one.  I have Windows 7 64bit.  Is there anywhere else I can

look for it besides c:\users? 

Thanks

 

 

Never mind I found it.


Edited by Minime 939, 22 July 2014 - 12:41 PM.

I7-920,Cogage True Spirit, GA-X58A-UD3R, CM HAF 922, 3x2 G GSkill Ripjaws 1600, Samsung F3 1TB, Corsair TX750, Asus 24x Combo, XFX R9 280X, LG 227WTG, Win 7 X64, G 500