; NVIDIA Display Driver uninstaller
killapp nvCplUI.exe
call Uninstall

[UninstallSilent]
Set ForceNoReboot=yes
call UninstallSilentReboot

[UninstallSilentReboot]
Set Silent=yes
call Uninstall
Delreg {UninstRegkey}\NVIDIA Display Driver
del {current Script}
del {Current Parser Path}

[Uninstall]
SysCallAndWait MsiExec /x{4C0A8D65-4286-4B58-87FE-18AD24289285} /quiet /norestart
SysCallAndWait MsiExec /x{71807498-D8E2-41C6-84CD-8ED7A076B6EC} /quiet /norestart
SysCallAndWait {syswow64dir}\nViewSetup -s -uninstall
SysCallAndWait {programfilesdir}\NVIDIA Corporation\nview\nViewSetup -s -uninstall

getreg UninstStr=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NVIDIAStereo\UninstallString
if {UninstStr}%.exe then syscallandwait {UninstStr} 
SysCallAndWait {sysdir}\regsvr32.exe /s /u {sysdir}\nvcpl.dll
SysCallAndWait {sysdir}\regsvr32.exe /s /u {sysdir}\nview.dll
SysCallAndWait {sysdir}\regsvr32.exe /s /u {sysdir}\nvshell.dll
SysCallAndWait {sysdir}\regsvr32.exe /s /u {sysdir}\nvwdmcpl.dll
SysCallAndWait {sysdir}\regsvr32.exe /s /u {sysdir}\nvmccs.dll


call UninstallSysdirSedona
call UninstallPFSedona
if {NVCPLRSServersPresent}=0 then if {NVCPLRS2ServersPresent}=0 then if {NVCPL2RSServersPresent}=0 then call UninstallSedonaHelp


UninstallService NVSvc

set nViewDialogRegkeyPath=Software\NVIDIA Corporation\Global\nViewInstalled
if {Silent}=yes then delreg HKLM\{nViewDialogRegkeyPath}
if {Silent}=yes then delreg HKCU\{nViewDialogRegkeyPath}

SysCallAndWait {sysdir}\nwiz.exe /uninstall
Del {windir}\nView 

SysCallAndWait {sysdir}\unlodctr nv
call Clean up registry

set Current Root Key=HKCU
set Current Reg Key=\Software\NVIDIA Corporation
call DelNoneWorkStationKeys
set Current Root Key=HKLM
call DelNoneWorkStationKeys
EnumRegCmd HKU\\{*}\Software\NVIDIA Corporation,Call DelNoneWorkStationKeys

delreg HKCR\TypeLib\{1AFBF72B-58EA-41CB-B117-3CDE0857F4A6}

Call DeleteFiles

RemoveDevice pci,VEN_10DE,Display

DelReg HKLM\Software\Microsoft\Windows\CurrentVersion\Run\NvDeskMgrRestart
DelReg HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run\NvDeskMgrRestart

enumregcmd HKLM\SYSTEM\{*ControlSet}\Control\Video\{*},call EnumVideoKeys
enumregcmd HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reinstall\{*},call DelReinstallKeys
set RegPath=HKCU\Software\Microsoft\Windows\ShellNoRoam\MUICache
EnumRegNamesCmd {RegPath}, if {current Reg Value}%NVIDIA then delreg {RegPath}\{Current Reg Name}

Enumregcmd HKLM\SYSTEM\{*ControlSet}\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\{*},call DelnvDualViewRegs

[DelnvDualViewRegs]
GetReg ProviderName={Current Root Key}\{Current Reg Key}\ProviderName
if {ProviderName}=NVIDIA then DelReg {Current Root Key}\{Current Reg Key}

[EnumVideoKeys]
set MyBaseKey={Current Root Key}\{Current Reg Key}
enumregcmd {MyBaseKey}\{*},call CheckNVIDIAVideoKeys

[CheckNVIDIAVideoKeys]
GetReg Device Description={Current Root Key}\{Current Reg Key}\Device Description
if {Device Description}%NVIDIA then delreg {MyBaseKey}

[DelReinstallKeys]
GetReg ProviderName={Current Root Key}\{Current Reg Key}\ProviderName
GetReg DeviceInstanceIds={Current Root Key}\{Current Reg Key}\DeviceInstanceIds
GetReg Class=HKLM\SYSTEM\CurrentControlSet\Enum\{DeviceInstanceIds}\Class
if {Class},{ProviderName}%Display,NVIDIA then DelReg {Current Root Key}\{Current Reg Key}

[Clean up registry]
call RemoveInfFromRegistry
DelReg HKLM\Software\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\RIVATNT
DelReg HKLM\Software\Microsoft\Windows\CurrentVersion\Run\NvCplCleanup
DelReg HKLM\Software\Microsoft\Windows\CurrentVersion\Run\NvCplDaemon
DelReg HKLM\Software\Microsoft\Windows\CurrentVersion\Run\nwiz
DelReg HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\DontShowMeThisDialogAgain\RestoreProfile
DelReg HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\DontShowMeThisDialogAgain\RestoreGlobals
DelReg HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run\NvCplCleanup
DelReg HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run\NvCplDaemon
DelReg HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run\nwiz
DelReg HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\NVIDIA Display Control Panel

DelReg HKLM\HARDWARE\\RESOURCEMAP\\VIDEO\nv4
DelReg HKLM\HARDWARE\\RESOURCEMAP\\VIDEO\nv
DelReg HKLM\SOFTWARE\NVIDIA Corporation\Installer
DelReg HKLM\Software\NVIDIA Corporation\nvDelFiles
DelReg HKLM\SOFTWARE\NVIDIA Corporation\NVAPI
DelReg HKLM\SYSTEM\CurrentControlSet\Services\nv\NVAPI
DelRegE HKLM\SOFTWARE\NVIDIA Corporation
DelRegE HKCU\SOFTWARE\NVIDIA Corporation

set RootKey=HKLM\SYSTEM\{*ControlSet}
call EnumAndDeleteHWKeys

call DelRegNVAPI

DelReg HKCR\CLSID\{FFB699E0-306A-11d3-8BD1-00104B6F7516}
set Current Root Key=HKLM
set Current Reg Key=\Software\Microsoft\Windows\CurrentVersion
call DeleteNTTweak
set RootKey=HKCU
call DeleteNTTweak

set Current Root Key=HKLM
set Current Reg Key=\Software\Wow6432Node\Microsoft\Windows\CurrentVersion
call DeleteNTTweak
set RootKey=HKCU
call DeleteNTTweak

EnumRegCmd HKU\\{*}\Software\Microsoft\Windows\CurrentVersion,Call DeleteNTTweak
EnumRegCmd HKU\\{*}\Software\Wow6432Node\Microsoft\Windows\CurrentVersion,Call DeleteNTTweak

[EnumAndDelProfileKeys]
DelReg {RegPath}\{*}\System\CurrentControlSet\Services\nv4
DelReg {RegPath}\{*}\System\CurrentControlSet\Services\nv

[EnumAndDeleteHWKeys]
DelReg {RootKey}\Services\nv4
DelReg {RootKey}\Services\EventLog\System\nv4
DelReg {RootKey}\Enum\Root\LEGACY_NV4
DelReg {RootKey}\Services\nv
DelReg {RootKey}\Services\EventLog\System\nv
DelReg {RootKey}\Enum\Root\LEGACY_NV
set RegPath={RootKey}\Services
DelReg {RegPath}\nvcap
DelReg {RegPath}\nvtunep
DelReg {RegPath}\tvsnd
DelReg {RegPath}\nvxbar
set RegPath={RootKey}\Enum\DISPLAY
DelReg {RegPath}\nvcap
DelReg {RegPath}\nvtunep
DelReg {RegPath}\tvsnd
DelReg {RegPath}\nvxbar
DelReg {RegPath}\nvMultiView
set RegPath={RootKey}\Hardware Profiles
call EnumAndDelProfileKeys
DelReg {RootKey}\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\{*}\CoInstallers32
DelReg {RootKey}\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\{*}\Uninstall
EnumRegCmd HKLM\SYSTEM\{*ControlSet}\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\{*},Call CheckWDMDriver

[CheckDriver]
GetReg Class={Current Root Key}\{Current Reg Key}\class
GetReg Mfg={Current Root Key}\{Current Reg Key}\Mfg
if {Class},{Mfg}=Display,NVIDIA then DelReg {Current Root Key}\{Current Reg Key}

[CheckWDMDriver]
GetReg ProviderName={Current Root Key}\{Current Reg Key}\ProviderName
GetReg MatchingDeviceId={Current Root Key}\{Current Reg Key}\MatchingDeviceId
if {ProviderName},{MatchingDeviceId}=nVidia,display\nvcap then DelReg {Current Root Key}\{Current Reg Key}
if {ProviderName},{MatchingDeviceId}=nVidia,display\nvxbar then DelReg {Current Root Key}\{Current Reg Key}
if {ProviderName},{MatchingDeviceId}=nVidia,display\nvtunep then DelReg {Current Root Key}\{Current Reg Key}
if {ProviderName},{MatchingDeviceId}=nVidia,display\nvtvsnd then DelReg {Current Root Key}\{Current Reg Key}

[DeleteNTTweak]
delreg {Current Root Key}{Current Reg Key}\Controls Folder\Display\shellex\PropertySheetHandlers\NVIDIA CPL Extension
delreg {Current Root Key}{Current Reg Key}\Run\Nv4QuickTweak
delreg {Current Root Key}{Current Reg Key}\Run\Nv4ColorInit
delreg {Current Root Key}{Current Reg Key}\Run\NvInitialize
delreg {Current Root Key}{Current Reg Key}\Run\NvMediaCenter
delreg {Current Root Key}{Current Reg Key}\Run\NvDeskMgrRestart
delreg {Current Root Key}{Current Reg Key}\RunOnce\NvCplDaemon
delreg {Current Root Key}{Current Reg Key}\RunOnce\nwiz
delreg {Current Root Key}{Current Reg Key}\RunOnce\NvRegisterMCTray
delreg {Current Root Key}{Current Reg Key}\RunOnce\NvRegisterMCTrayNview

[DelNoneWorkStationKeys]
DelReg  {Current Root Key}{Current Reg Key}\Global\NvSvc
DelReg  {Current Root Key}{Current Reg Key}\Global\NVTweak
DelReg  {Current Root Key}{Current Reg Key}\Global\NVDesk
DelReg  {Current Root Key}{Current Reg Key}\Global\Setup
DelReg  {Current Root Key}{Current Reg Key}\Global\MediaCenterTray
DelReg  {Current Root Key}{Current Reg Key}\Global
DelRegE {Current Root Key}{Current Reg Key}

[DeleteFiles]
DelOemInfs nv*,Version,Class,Display,Version,Provider,%NVIDIA%
DelOemInfs nv*,Version,Class,Display,Strings,Mfg,NVIDIA
DelOemInfs nv*,Version,Class,Media,Strings,MS,nVidia
DelIniIfMatched {windir}\INF\INTERNET\NVIDIA*.INF,Version,Class,Display

set BasePath={sysdir}
DelBoot {basepath}\nv4_disp.dll
DelBoot {basepath}\nvdccapp.cfg
DelBoot {basepath}\nvwsapps.cfg
DelBoot {basepath}\nvtuicpl.cpl
DelBoot {basepath}\nvcpl.dll
DelBoot {basepath}\nvmofb.mof
DelBoot {basepath}\nview.dll
DelBoot {basepath}\nview64.dll
DelBoot {basepath}\nviewimg.dll
DelBoot {basepath}\nvwimg64.dll
DelBoot {basepath}\nviewx.dll
DelBoot {basepath}\nvinstnt.dll
DelBoot {basepath}\nvmccs.dll
DelBoot {basepath}\nvmccsrs.dll
DelBoot {basepath}\nvmctray.dll
DelBoot {basepath}\nvnt4cpl.dll
DelBoot {basepath}\nvoglnt.dll
DelBoot {basepath}\nvshell.dll
DelBoot {basepath}\nvwddi.dll
DelBoot {basepath}\nvwddi64.dll
DelBoot {basepath}\nvwdmcpl.dll
DelBoot {basepath}\dmcpl.exe
DelBoot {basepath}\keystone.exe
DelBoot {basepath}\nvappbar.exe
DelBoot {basepath}\nvsvc.exe
DelBoot {basepath}\nvsvc32.exe
DelBoot {basepath}\nvsvc64.exe
DelBoot {basepath}\nwiz.exe
DelBoot {basepath}\aliagp.sys
DelBoot {basepath}\drivers\nv4_mini.sys
DelBoot {basepath}\drivers\nvcap.sys
DelBoot {basepath}\drivers\nvxbar.sys
DelBoot {basepath}\drivers\nvtvsnd.sys
DelBoot {basepath}\drivers\nvtunep.sys
DelBoot {basepath}\filter.ax
DelBoot {basepath}\nvcod.dll
DelBoot {basepath}\nvcodins.dll
DelBoot {basepath}\nvapps.xml
DelBoot {basepath}\nvwsapps.xml
DelBoot {basepath}\nvapps.nvb
DelBoot {basepath}\nvwsapps.nvb
DelBoot {basepath}\nvhwvid.dll
DelBoot {basepath}\nvcolor.exe
DelBoot {basepath}\nvdspsch.exe
DelBoot {basepath}\nvwimg.dll
DelBoot {basepath}\nvapi.dll
DelBoot {basepath}\nvapi64.dll

DelBoot {basepath}\nvarch16.dll
DelBoot {basepath}\nvarch32.dll
DelBoot {basepath}\nvdd32.dll
DelBoot {basepath}\nvmode.dll
DelBoot {basepath}\nvopengl.dll
DelBoot {basepath}\nvdisp.drv
DelBoot {basepath}\agart.vxd
DelBoot {basepath}\nvcore.vxd
DelBoot {basepath}\nvmini.vxd
DelBoot {basepath}\nvmini2.vxd
DelBoot {basepath}\alipcimp.pci
DelBoot {basepath}\nvinst32.dll
DelBoot {basepath}\nvgfx.dll

DelBoot {sysdir}\dllcache\nv4_mini.sys
DelBoot {sysdir}\dllcache\nv4_disp.dll
DelBoot {sysdir}\nvcuda.dll
DelBoot {sysdir}\nvcuvid.dll
Delboot {sysdir}\nvcuvenc.dll
DelBoot {sysdir}\nvucode.bin
DelBoot {sysdir}\nvModes.dat
DelBoot {sysdir}\nvModes.001
DelBoot {sysdir}\nvUnsupRes.dat
DelBoot {sysdir}\nvcompiler.dll
DelBoot {syswow64dir}\nvcompiler.dll
DelBoot {sysdir}\opencl.dll
DelBoot {syswow64dir}\opencl.dll

DelBoot {basepath}\nvpmapi.dll
DelBoot {basepath}\nvprfctr.reg
DelBoot {basepath}\nvprfctr.ini
DelBoot {basepath}\nvprfsmb.h

DelBoot {syswow64dir}\nvogl32.dll
DelBoot {syswow64dir}\nview.dll
DelBoot {syswow64dir}\nvwdmcpl.dll
DelBoot {syswow64dir}\nvappbar.exe
DelBoot {syswow64dir}\nviewimg.dll
DelBoot {syswow64dir}\nvnt4cpl.dll
DelBoot {syswow64dir}\nvwddi.dll
DelBoot {syswow64dir}\nwiz.exe
DelBoot {syswow64dir}\keystone.exe
DelBoot {syswow64dir}\nvapi.dll
Delboot {syswow64dir}\nvwsapps.xml
Delboot {syswow64dir}\nvapps.xml
Delboot {syswow64dir}\nvcuda.dll
Delboot {syswow64dir}\nvcuvid.dll
Delboot {syswow64dir}\nvcuvenc.dll

DelBoot {basepath}\nvrsar.dll
DelBoot {basepath}\nvrscs.dll
DelBoot {basepath}\nvrsda.dll
DelBoot {basepath}\nvrsde.dll
DelBoot {basepath}\nvrsel.dll
DelBoot {basepath}\nvrseng.dll
DelBoot {basepath}\nvrses.dll
DelBoot {basepath}\nvrsesm.dll
DelBoot {basepath}\nvrsfi.dll
DelBoot {basepath}\nvrsfr.dll
DelBoot {basepath}\nvrshe.dll
DelBoot {basepath}\nvrshu.dll
DelBoot {basepath}\nvrsit.dll
DelBoot {basepath}\nvrsja.dll
DelBoot {basepath}\nvrsko.dll
DelBoot {basepath}\nvrsnl.dll
DelBoot {basepath}\nvrsno.dll
DelBoot {basepath}\nvrspl.dll
DelBoot {basepath}\nvrspt.dll
DelBoot {basepath}\nvrsptb.dll
DelBoot {basepath}\nvrsru.dll
DelBoot {basepath}\nvrssk.dll
DelBoot {basepath}\nvrssl.dll
DelBoot {basepath}\nvrssv.dll
DelBoot {basepath}\nvrstr.dll
DelBoot {basepath}\nvrsth.dll
DelBoot {basepath}\nvrszhc.dll
DelBoot {basepath}\nvrszht.dll

DelBoot {basepath}\nvwrsar.dll
DelBoot {basepath}\nvwrscs.dll
DelBoot {basepath}\nvwrsda.dll
DelBoot {basepath}\nvwrsde.dll
DelBoot {basepath}\nvwrsel.dll
DelBoot {basepath}\nvwrseng.dll
DelBoot {basepath}\nvwrses.dll
DelBoot {basepath}\nvwrsesm.dll
DelBoot {basepath}\nvwrsfi.dll
DelBoot {basepath}\nvwrsfr.dll
DelBoot {basepath}\nvwrshe.dll
DelBoot {basepath}\nvwrshu.dll
DelBoot {basepath}\nvwrsit.dll
DelBoot {basepath}\nvwrsja.dll
DelBoot {basepath}\nvwrsko.dll
DelBoot {basepath}\nvwrsnl.dll
DelBoot {basepath}\nvwrsno.dll
DelBoot {basepath}\nvwrspl.dll
DelBoot {basepath}\nvwrspt.dll
DelBoot {basepath}\nvwrsptb.dll
DelBoot {basepath}\nvwrsru.dll
DelBoot {basepath}\nvwrssk.dll
DelBoot {basepath}\nvwrssl.dll
DelBoot {basepath}\nvwrssv.dll
DelBoot {basepath}\nvwrstr.dll
DelBoot {basepath}\nvwrszhc.dll
DelBoot {basepath}\nvwrszht.dll

set BasePath={windir}\help
DelBoot {basepath}\nv3tweak.hlp
DelBoot {basepath}\nvcpar.hlp
DelBoot {basepath}\nvcpcs.hlp
DelBoot {basepath}\nvcpda.hlp
DelBoot {basepath}\nvcpde.hlp
DelBoot {basepath}\nvcpel.hlp
DelBoot {basepath}\nvcpeng.hlp
DelBoot {basepath}\nvcpes.hlp
DelBoot {basepath}\nvcpesm.hlp
DelBoot {basepath}\nvcpfi.hlp
DelBoot {basepath}\nvcpfr.hlp
DelBoot {basepath}\nvcpfr.hlp
DelBoot {basepath}\nvcphe.hlp
DelBoot {basepath}\nvcphu.hlp
DelBoot {basepath}\nvcpit.hlp
DelBoot {basepath}\nvcpja.hlp
DelBoot {basepath}\nvcpko.hlp
DelBoot {basepath}\nvcpl.hlp
DelBoot {basepath}\nvcpnl.hlp
DelBoot {basepath}\nvcpno.hlp
DelBoot {basepath}\nvcppl.hlp
DelBoot {basepath}\nvcppt.hlp
DelBoot {basepath}\nvcpptb.hlp
DelBoot {basepath}\nvcpru.hlp
DelBoot {basepath}\nvcpsk.hlp
DelBoot {basepath}\nvcpsl.hlp
DelBoot {basepath}\nvcpsv.hlp
DelBoot {basepath}\nvcpth.hlp
DelBoot {basepath}\nvcptr.hlp
DelBoot {basepath}\nvcpzhc.hlp
DelBoot {basepath}\nvcpzht.hlp

DelBoot {basepath}\nvwcpar.hlp
DelBoot {basepath}\nvwcpcs.hlp
DelBoot {basepath}\nvwcpda.hlp
DelBoot {basepath}\nvwcpde.hlp
DelBoot {basepath}\nvwcpel.hlp
DelBoot {basepath}\nvwcpeng.hlp
DelBoot {basepath}\nvwcpes.hlp
DelBoot {basepath}\nvwcpesm.hlp
DelBoot {basepath}\nvwcpfi.hlp
DelBoot {basepath}\nvwcpfr.hlp
DelBoot {basepath}\nvwcpfr.hlp
DelBoot {basepath}\nvwcphe.hlp
DelBoot {basepath}\nvwcphu.hlp
DelBoot {basepath}\nvwcpit.hlp
DelBoot {basepath}\nvwcpja.hlp
DelBoot {basepath}\nvwcpko.hlp
DelBoot {basepath}\nvwcplen.hlp
DelBoot {basepath}\nvwcpnl.hlp
DelBoot {basepath}\nvwcpno.hlp
DelBoot {basepath}\nvwcppl.hlp
DelBoot {basepath}\nvwcppt.hlp
DelBoot {basepath}\nvwcpptb.hlp
DelBoot {basepath}\nvwcpru.hlp
DelBoot {basepath}\nvwcpsk.hlp
DelBoot {basepath}\nvwcpsl.hlp
DelBoot {basepath}\nvwcpsv.hlp
DelBoot {basepath}\nvwcpth.hlp
DelBoot {basepath}\nvwcptr.hlp
DelBoot {basepath}\nvwcpzhc.hlp
DelBoot {basepath}\nvwcpzht.hlp

DelBoot {basepath}\nvmontrs.cfg
DelBoot {basepath}\nv3api.dll
DelBoot {basepath}\nv3dd32.dll
DelBoot {basepath}\nv3ogl.dll
DelBoot {basepath}\nv3qtwk.dll
DelBoot {basepath}\nv3rm.vxd
DelBoot {basepath}\nv3sys.dll
DelBoot {basepath}\nv3tweak.dll
DelBoot {basepath}\nv4_kdisp.dll 
DelBoot {basepath}\nvdesk32.dll
DelBoot {basepath}\nvdmcpl.dll
DelBoot {basepath}\nvds15.dll
DelBoot {basepath}\nvdspmgr.dll
DelBoot {basepath}\nvogl32.dll
DelBoot {basepath}\nvqtwk.dll
DelBoot {basepath}\nvstercp.dll
DelBoot {basepath}\nvstercp.dll
DelBoot {basepath}\nvstres.dll
DelBoot {basepath}\oemdspif.dll
DelBoot {basepath}\maxtreme.drv
DelBoot {basepath}\nv3disp.drv
DelBoot {basepath}\nvfsvm.exe
DelBoot {basepath}\nvsttest.exe
DelBoot {basepath}\nvstview.exe
DelBoot {basepath}\quadroview.exe
DelBoot {basepath}\nvdual.sys
DelBoot {basepath}\nv3.vxd
DelBoot {basepath}\nv3mini2.vxd


del {windir}\nvidia icons\Portal_32x32.ico
del {windir}\nvidia icons\Portal_48x48.ico
GetFolderPath Desktop=25
del {Desktop}\Play Portal Now.lnk

Del {sysdir}\nvsys\nvinst32.dll 
Del {sysdir}\nvsys
Del {sysdir}\nvdata.bin

[RemoveInfFromRegistry]
DelReg HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\SetupX\INF\OEM Name\{windir}\INF\nvaml.inf

[UninstallSedonaHelp]
Set current file
DirAndApply {windir}\help\nvcpl\nvst3*.chm,del {current file}
Set current file
DirAndApply {windir}\help\nvcpl\nvcpl*.cab,del {current file}
Set current file
DirAndApply {windir}\help\nvcpl\nvdsp*.chm,del {current file}
Set current file
DirAndApply {windir}\help\nvcpl\nv3d*.chm,del {current file}
Set current file
DirAndApply {windir}\help\nvcpl\nvmob*.chm,del {current file}
Set current file
DirAndApply {windir}\help\nvcpl\nvwks*.chm,del {current file}
del {windir}\help\nvcpl
Set current file
DirAndApply {sysdir}\nvmob*.chm,del {current file}
Set current file
DirAndApply {sysdir}\nvdsp*.chm,del {current file}
Set current file
DirAndApply {sysdir}\nvcpl*.chm,del {current file}
Set current file
DirAndApply {sysdir}\nv3d*.chm,del {current file}
Set current file
DirAndApply {sysdir}\nvwks*.chm,del {current file}

[UninstallSysdirSedona]
SysCallAndWait {sysdir}\regsvr32.exe /s /u {sysdir}\nvdisps.dll
SysCallAndWait {sysdir}\regsvr32.exe /s /u {sysdir}\nvgames.dll
SysCallAndWait {sysdir}\regsvr32.exe /s /u {sysdir}\nvmcsss.dll
SysCallAndWait {sysdir}\regsvr32.exe /s /u {sysdir}\nvmobls.dll
SysCallAndWait {sysdir}\regsvr32.exe /s /u {sysdir}\nvvitvs.dll
SysCallAndWait {sysdir}\regsvr32.exe /s /u {sysdir}\nvwss.dll

DelBoot {sysdir}\nvdisps.dll
DelBoot {sysdir}\nvgames.dll
DelBoot {sysdir}\nvmccss.dll
DelBoot {sysdir}\nvmobls.dll
DelBoot {sysdir}\nvvitvs.dll
DelBoot {sysdir}\nvwss.dll
Delboot {sysdir}\nvsvs.dll
Delboot {sysdir}\nvsvsr.dll

Set NVCPLRSServersPresent=0
EnumRegNamesCmd HKLM\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers, increment NVCPLRSServersPresent
EnumRegNamesCmd HKLM\Software\NVIDIA Corporation\Global\NVControlPanel\RegisteredServers, increment NVCPLRSServersPresent
if {NVCPLRSServersPresent}=0 then call UninstallSysdirSedonaClient

[UninstallPFSedona]
SysCallAndWait {sysdir}\regsvr32.exe /s /u "{ProgramFilesDir}\NVIDIA Corporation\Display\nvsvs.dll"
SysCallAndWait {sysdir}\regsvr32.exe /s /u "{ProgramFilesDir}\NVIDIA Corporation\Display\nvsvsr.dll"
SysCallAndWait {sysdir}\regsvr32.exe /s /u "{ProgramFilesDir}\NVIDIA Corporation\Display\nvmccs.dll"
SysCallAndWait {sysdir}\regsvr32.exe /s /u "{ProgramFilesDir}\NVIDIA Corporation\Display\nvmccss.dll"
SysCallAndWait {sysdir}\regsvr32.exe /s /u "{ProgramFilesDir}\NVIDIA Corporation\Display\nvdisps.dll"
SysCallAndWait {sysdir}\regsvr32.exe /s /u "{ProgramFilesDir}\NVIDIA Corporation\Display\nvgames.dll"
SysCallAndWait {sysdir}\regsvr32.exe /s /u "{ProgramFilesDir}\NVIDIA Corporation\Display\nvmobls.dll"
SysCallAndWait {sysdir}\regsvr32.exe /s /u "{ProgramFilesDir}\NVIDIA Corporation\Display\nvvitvs.dll"
SysCallAndWait {sysdir}\regsvr32.exe /s /u "{ProgramFilesDir}\NVIDIA Corporation\Display\nvwss.dll"

SysCallAndWait "{ProgramFilesDir}\NVIDIA Corporation\Drs\dbInstaller.exe" -uninstall

del {ProgramFilesDir}\NVIDIA Corporation\Drs\dbInstaller.exe
del {ProgramFilesDir}\NVIDIA Corporation\Drs\nvdrsdb.bin
del {ProgramFilesDir}\NVIDIA Corporation\Drs

delAll {ProgramFilesDir}\NVIDIA Corporation\Installer1

del {ProgramFilesDir}\NVIDIA Corporation\Display\nvdisps.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvgames.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvmccss.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvmccs.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvmobls.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvvitvs.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvwss.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvsvs.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvsvsr.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvdispsr.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvgamesr.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvmccssr.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvmoblsr.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvvitvsr.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display\nvwssr.dll
del {ProgramFilesDir}\NVIDIA Corporation\Display
del {ProgramFilesDir}\NVIDIA Corporation

Set NVCPL2RSServersPresent=0
EnumRegNamesCmd HKLM\Software\NVIDIA Corporation\NVControlPanel2\RegisteredServers, increment NVCPL2RSServersPresent
Set NVCPLRS2ServersPresent=0
EnumRegNamesCmd HKLM\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers2, increment NVCPLRS2ServersPresent
if {NVCPLRS2ServersPresent}=1 then if {NVCPL2RSServersPresent}=0 then call CheckCPL2RSDummyServerGUID
if {NVCPLRS2ServersPresent}=0 then if {NVCPL2RSServersPresent}=0 then call UninstallPFSedonaClient

[CheckCPL2RSDummyServerGUID]
set DummyExists=NULL
GetReg DummyExists=HKLM\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers2\Dummy
if {DummyExists}={00000000-0000-0000-0000-000000000001} then set NVCPLRS2ServersPresent = 0


[UninstallSysdirSedonaClient]
DelBoot {sysdir}\nvcpl.exe
DelBoot {sysdir}\nvcplui.exe
DelBoot {sysdir}\nvcpl.cpl
DelBoot {sysdir}\nvcpluir.dll
DelBoot {sysdir}\nvexpbar.dll
DelBoot {sysdir}\nvdispsr.dll
DelBoot {sysdir}\nvgamesr.dll
DelBoot {sysdir}\nvmccssr.dll
DelBoot {sysdir}\nvmoblsr.dll
DelBoot {sysdir}\nvvitvsr.dll
DelBoot {sysdir}\nvwssr.dll
Delboot {sysdir}\NvPVEnc.ax
Delboot {sysdir}\nvcpl32.exe

DelReg HKLM\Software\NVIDIA Corporation\NVIDIA Control Panel
DelReg HKLM\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers\Overrides
DelRegE HKLM\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers
DelReg HKLM\Software\NVIDIA Corporation\NVControlPanel\InstalledClient
DelReg HKLM\Software\NVIDIA Corporation\NVControlPanel\HelpFile
DelReg HKLM\Software\NVIDIA Corporation\NVControlPanel\Client
DelRegE HKLM\Software\NVIDIA Corporation\NVControlPanel
DelRegE HKLM\Software\NVIDIA Corporation

DelReg HKCU\Software\NVIDIA Corporation\NVIDIA Control Panel
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers\Overrides
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers\DisplayPanelServer
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers\GamesConfigServer
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers\MobileServer
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers\Video_TVServer
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers\WorkStationServer
DelRegE HKCU\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel\InstalledClient
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel\HelpFile
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel\Client
DelRegE HKCU\Software\NVIDIA Corporation\NVControlPanel
DelRegE HKCU\Software\NVIDIA Corporation
del {CommonPrograms}\NVIDIA Corporation

[UninstallPFSedonaClient]
del {ProgramFilesDir}\NVIDIA Corporation\Control Panel Client\nvcplui.exe
del {ProgramFilesDir}\NVIDIA Corporation\Control Panel Client\nvcpluir.dll
del {ProgramFilesDir}\NVIDIA Corporation\Control Panel Client
del {ProgramFilesDir}\NVIDIA Corporation

DelReg HKLM\Software\NVIDIA Corporation\NVIDIA Control Panel
DelReg HKLM\Software\NVIDIA Corporation\NVControlPanel2\RegisteredServers\Overrides
DelRegE HKLM\Software\NVIDIA Corporation\NVControlPanel2\RegisteredServers
DelReg HKLM\Software\NVIDIA Corporation\NVControlPanel2\InstalledClient
DelReg HKLM\Software\NVIDIA Corporation\NVControlPanel2\HelpFile
DelReg HKLM\Software\NVIDIA Corporation\NVControlPanel2\Client
DelRegE HKLM\Software\NVIDIA Corporation\NVControlPanel2
DelReg HKLM\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers2\Dummy
DelRegE HKLM\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers2
DelRegE HKLM\Software\NVIDIA Corporation\NVControlPanel
DelRegE HKLM\Software\NVIDIA Corporation

DelReg HKCU\Software\NVIDIA Corporation\NVIDIA Control Panel
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel2\RegisteredServers\Overrides
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel2\RegisteredServers\DisplayPanelServer
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel2\RegisteredServers\GamesConfigServer
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel2\RegisteredServers\MobileServer
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel2\RegisteredServers\Video_TVServer
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel2\RegisteredServers\WorkStationServer
DelRegE HKCU\Software\NVIDIA Corporation\NVControlPanel2\RegisteredServers
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel2\InstalledClient
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel2\HelpFile
DelReg HKCU\Software\NVIDIA Corporation\NVControlPanel2\Client
DelRegE HKCU\Software\NVIDIA Corporation\NVControlPanel2
DelRegE HKCU\Software\NVIDIA Corporation

DelReg HKCR\CLSID\{0bbca823-e77d-419e-9a44-5adec2c8eeb0}
DelReg HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{0bbca823-e77d-419e-9a44-5adec2c8eeb0}
DelReg HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\don't load\nvcpl.cpl 

del {CommonPrograms}\NVIDIA Corporation

