;
; Uninstall NVIDIA RAID app (MediaShield)
;
killapp nvraidservice.exe

SysCallAndWait {sysdir}\regsvr32.exe /s /u "{sysdir}\NvRaidWizard.dll"

delreg HKLM\Software\Microsoft\Windows\CurrentVersion\Run\NVRaidService
delreg HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\DontShowMeThisDialogAgain\NVIDIA_MEDIASHIELD_CREATE_ARRAY_PROMPT

delreg HKCU\Software\NVIDIA Corporation\NVRAID\Settings\ShowToolTips
delreg HKCU\Software\NVIDIA Corporation\NVRAID\Settings\WindowPositionX
delreg HKCU\Software\NVIDIA Corporation\NVRAID\Settings\WindowPositionY
delreg HKCU\Software\NVIDIA Corporation\NVRAID\Settings\WindowResolutionX
delreg HKCU\Software\NVIDIA Corporation\NVRAID\Settings\WindowResolutionY
delrege HKCU\Software\NVIDIA Corporation\NVRAID\Settings
delrege HKCU\Software\NVIDIA Corporation\NVRAID
delrege HKCU\Software\NVIDIA Corporation\NVRAIDDisk

delreg HKCU\Software\NVIDIA Corporation\SataConnection\Settings\ShowToolTips
delreg HKCU\Software\NVIDIA Corporation\SataConnection\Settings\WindowPositionX
delreg HKCU\Software\NVIDIA Corporation\SataConnection\Settings\WindowPositionY
delreg HKCU\Software\NVIDIA Corporation\SataConnection\Settings\WindowResolutionX
delreg HKCU\Software\NVIDIA Corporation\SataConnection\Settings\WindowResolutionY
delrege HKCU\Software\NVIDIA Corporation\SataConnection\Settings
delrege HKCU\Software\NVIDIA Corporation\SataConnection

delrege HKCU\Software\NVIDIA Corporation

Del {sysdir}\nvcchflt.sys
del {SysDir}\NvRaidMan.exe
del {SysDir}\NvRaidar.dll
del {SysDir}\NvRaidcs.dll
del {SysDir}\NvRaidda.dll
del {SysDir}\NvRaidde.dll
del {SysDir}\NvRaidel.dll
del {SysDir}\NvRaideng.dll
del {SysDir}\NvRaidEnu.dll
del {SysDir}\NvRaides.dll
del {SysDir}\NvRaidfi.dll
del {SysDir}\NvRaidfr.dll
del {SysDir}\NvRaidhe.dll
del {SysDir}\NvRaidhu.dll
del {SysDir}\NvRaidit.dll
del {SysDir}\NvRaidja.dll
del {SysDir}\NvRaidko.dll
del {SysDir}\NvRaidnl.dll
del {SysDir}\NvRaidno.dll
del {SysDir}\NvRaidpl.dll
del {SysDir}\NvRaidpt.dll
del {SysDir}\NvRaidptb.dll
del {SysDir}\NvRaidru.dll
del {SysDir}\NvRaidsk.dll
del {SysDir}\NvRaidsl.dll
del {SysDir}\NvRaidsv.dll
del {SysDir}\NvRaidth.dll
del {SysDir}\NvRaidtr.dll
del {SysDir}\NvRaidzhc.dll
del {SysDir}\NvRaidzht.dll
del {SysDir}\nvraidservice.exe
del {SysDir}\NvRaidSvar.dll
del {SysDir}\NvRaidSvcs.dll
del {SysDir}\NvRaidSvda.dll
del {SysDir}\NvRaidSvde.dll
del {SysDir}\NvRaidSvel.dll
del {SysDir}\NvRaidSveng.dll
del {SysDir}\NvRaidSvEnu.dll
del {SysDir}\NvRaidSves.dll
del {SysDir}\NvRaidSvfi.dll
del {SysDir}\NvRaidSvfr.dll
del {SysDir}\NvRaidSvhe.dll
del {SysDir}\NvRaidSvhu.dll
del {SysDir}\NvRaidSvit.dll
del {SysDir}\NvRaidSvja.dll
del {SysDir}\NvRaidSvko.dll
del {SysDir}\NvRaidSvnl.dll
del {SysDir}\NvRaidSvno.dll
del {SysDir}\NvRaidSvpl.dll
del {SysDir}\NvRaidSvpt.dll
del {SysDir}\NvRaidSvptb.dll
del {SysDir}\NvRaidSvru.dll
del {SysDir}\NvRaidSvsk.dll
del {SysDir}\NvRaidSvsl.dll
del {SysDir}\NvRaidSvsv.dll
del {SysDir}\NvRaidSvth.dll
del {SysDir}\NvRaidSvtr.dll
del {SysDir}\NvRaidSvzhc.dll
del {SysDir}\NvRaidSvzht.dll
del {SysDir}\NvRaidWizard.dll
del {SysDir}\NvRaidWizardar.dll
del {SysDir}\NvRaidWizardcs.dll
del {SysDir}\NvRaidWizardda.dll
del {SysDir}\NvRaidWizardde.dll
del {SysDir}\NvRaidWizardel.dll
del {SysDir}\NvRaidWizardeng.dll
del {SysDir}\NvRaidWizardEnu.dll
del {SysDir}\NvRaidWizardes.dll
del {SysDir}\NvRaidWizardfi.dll
del {SysDir}\NvRaidWizardfr.dll
del {SysDir}\NvRaidWizardhe.dll
del {SysDir}\NvRaidWizardhu.dll
del {SysDir}\NvRaidWizardit.dll
del {SysDir}\NvRaidWizardja.dll
del {SysDir}\NvRaidWizardko.dll
del {SysDir}\NvRaidWizardnl.dll
del {SysDir}\NvRaidWizardno.dll
del {SysDir}\NvRaidWizardpl.dll
del {SysDir}\NvRaidWizardpt.dll
del {SysDir}\NvRaidWizardptb.dll
del {SysDir}\NvRaidWizardru.dll
del {SysDir}\NvRaidWizardsk.dll
del {SysDir}\NvRaidWizardsl.dll
del {SysDir}\NvRaidWizardsv.dll
del {SysDir}\NvRaidWizardth.dll
del {SysDir}\NvRaidWizardtr.dll
del {SysDir}\NvRaidWizardzhc.dll
del {SysDir}\NvRaidWizardzht.dll
del {SysDir}\NvSataConnection.exe
del {SysDir}\NvSataConnectionar.dll
del {SysDir}\NvSataConnectioncs.dll
del {SysDir}\NvSataConnectionda.dll
del {SysDir}\NvSataConnectionde.dll
del {SysDir}\NvSataConnectionel.dll
del {SysDir}\NvSataConnectioneng.dll
del {SysDir}\NvSataConnectionEnu.dll
del {SysDir}\NvSataConnectiones.dll
del {SysDir}\NvSataConnectionfi.dll
del {SysDir}\NvSataConnectionfr.dll
del {SysDir}\NvSataConnectionhe.dll
del {SysDir}\NvSataConnectionhu.dll
del {SysDir}\NvSataConnectionit.dll
del {SysDir}\NvSataConnectionja.dll
del {SysDir}\NvSataConnectionko.dll
del {SysDir}\NvSataConnectionnl.dll
del {SysDir}\NvSataConnectionno.dll
del {SysDir}\NvSataConnectionpl.dll
del {SysDir}\NvSataConnectionpt.dll
del {SysDir}\NvSataConnectionptb.dll
del {SysDir}\NvSataConnectionru.dll
del {SysDir}\NvSataConnectionsk.dll
del {SysDir}\NvSataConnectionsl.dll
del {SysDir}\NvSataConnectionsv.dll
del {SysDir}\NvSataConnectionth.dll
del {SysDir}\NvSataConnectiontr.dll
del {SysDir}\NvSataConnectionzhc.dll
del {SysDir}\NvSataConnectionzht.dll
del {SysDir}\drivers\nvcchflt.sys


SysCallAndWait {sysdir}\regsvr32.exe /s /u "{sysdir}\NvRaidServer.dll"
set current file
DirAndApply {sysdir}\nvraidserver*.dll,DelBoot {current file}

DelBoot {sysdir}\regraidsedona.bat

Set current file
DirAndApply {windir}\help\nvcpl\nvsto*.chm,DelBoot {current file}

set Shortcutpath={CommonPrograms}\NVIDIA Corporation\NVIDIA Control Panel
set ShortcutName=Storage.lnk
call DelShortCut
set Shortcutpath={CommonPrograms}\NVIDIA Corporation\MediaShield
set ShortcutName=MediaShield.lnk
call DelShortCut
del {ALLUSERSPROFILEDir}\Desktop\{ShortcutName}
set Shortcutpath={CommonPrograms}\NVIDIA Corporation\RAIDManager
set ShortcutName=RAIDManager.lnk
call DelShortCut

delreg HKLM\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers\NvRaidServer
delreg HKLM\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers\NVRaidService
delreg HKLM\Software\NVIDIA Corporation\Global\NVControlPanel\RegisteredServers\NVRaidService

Set ServersPresent=0
EnumRegNamesCmd HKLM\Software\NVIDIA Corporation\NVControlPanel\RegisteredServers, set ServersPresent=1
EnumRegNamesCmd HKLM\Software\NVIDIA Corporation\Global\NVControlPanel\RegisteredServers, set ServersPresent=1
if {ServersPresent}=0 then call UninstallSedonaClient


[UninstallSedonaClient]
DelBoot {sysdir}\nvcpl.exe
DelBoot {sysdir}\nvcplui.exe
DelBoot {sysdir}\nvcpl.cpl
DelBoot {sysdir}\nvcpluir.dll
DelBoot {sysdir}\nvexpbar.dll

Set current file
DirAndApply {windir}\help\nvcpl\nvcpl*.chm,DelBoot {current file}
DelBoot {windir}\help\nvcpl
DelReg HKLM\Software\NVIDIA Corporation\NVControlPanel
DelRegE HKLM\Software\NVIDIA Corporation

set Shortcutpath={CommonPrograms}\NVIDIA Corporation\NVIDIA Control Panel
set ShortcutName=Control Panel.lnk
call DelShortCut

del {CommonPrograms}\NVIDIA Corporation
delboot {CommonPrograms}\NVIDIA Corporation


[DelShortCut]
del {Shortcutpath}\{ShortcutName}
delboot {Shortcutpath}
