Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- :: BatchGotAdmin
- :---------------
- REM -> Check for permissions
- IF “%PROCESSOR_ARCHITECTURE%” EQU "amd64" (
- >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
- ) ELSE (
- >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
- )
- REM -> If error flag set, we do not have admin.
- if ‘%errorlevel%’ NEQ ‘0’ (
- echo Requesting administrative privileges...
- goto UACPrompt
- ) else ( goto gotAdmin )
- :UACPrompt
- echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
- set params = %*:"=""
- echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
- "%temp%\getadmin.vbs"
- del "%temp%\getadmin.vbs"
- exit /B
- :gotAdmin
- pushd "%CD%"
- CD /D "%~dp0"
- :---------------
- SETLOCAL EnableDelayedExpansion
- for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
- set "DEL=%%a"
- )
- echo.
- echo.
- echo.
- call :ColorText 0c "Press any key to run the ST4 Super Nuke"
- echo.
- call :ColorText 0a "Warning -- This will completely obliterate ST4 from this PC"
- echo.
- echo.
- echo.
- @pause
- echo.
- call :ColorText 0b "Nuking ST4 from system registry"
- echo.
- taskkill /f /im iCueScheduler.exe
- net stop "SQL Server (SQL_ICCM)"
- wmic product where name="iCueScheduler" call uninstall /nointeractive
- rem set __COMPAT_LAYER=RunAsInvoker
- REG IMPORT "%~dp0\ST4_NUKE_W_MSSQL.reg"
- echo.
- call :ColorText 0a "ST4 System registry entries nuked"
- echo.
- echo.
- echo.
- pause
- echo.
- call :ColorText 0c "Please use Task Mgr to End Task on IcueScheduler before pressing any key to continue"
- echo.
- echo.
- call :ColorText 0a "All ICCM & BASF Color Software directories are about to be removed"
- echo.
- echo.
- pause
- echo.
- echo.
- RMDIR /s /q "C:\Program Files (x86)\BASF\ICCM14_NA"
- RMDIR /s /q "C:\Program Files (x86)\BASF\ICCM14_NA_NA"
- RMDIR /s /q "C:\Program Files (x86)\BASF\ICCM14_NA_NA_NA"
- RMDIR /s /q "C:\Program Files (x86)\BASF\iCueScheduler"
- RMDIR /s /q "C:\ProgramData\BASF\ICCM2"
- RMDIR /s /q "C:\Users\Public\Desktop\BASF Color Software"
- RMDIR /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\BASF Color Software"
- RMDIR /s /q "C:\Program Files\BASF\ICCM14_NA"
- RMDIR /s /q "C:\Program Files\BASF\ICCM14_NA_NA"
- RMDIR /s /q "C:\Program Files\BASF\ICCM14_NA_NA_NA"
- RMDIR /s /q "C:\Program Files\BASF\iCueScheduler"
- DEL /s /q "C:\Users\BASF\Desktop\SmartColor IV.lnk"
- DEL /s /q "C:\Users\BASF\Desktop\SmartTrak IV.lnk"
- echo.
- call :ColorText 0c "---IF--- The system cannot find the file specified = No directory present to delete"
- call :ColorText 0b "---IF--- Access is denied = Files or Folders stuck in memory. Run Task Mgr to End Tasks"
- call :ColorText 0a "ICCM14_NA no longer present"
- call :ColorText 0a "ICCM14_NA_NA no longer present"
- call :ColorText 0a "ICCM14_NA_NA_NA no longer present"
- call :ColorText 0a "C:\ProgramData\BASF\ICCM2 no longer present"
- call :ColorText 0a "BASF Color Software no longer present on Desktop"
- call :ColorText 0a "BASF Color Software removed from Start Menu"
- call :ColorText 0a "ST4 and SCOLOR Desktop icons deleted"
- echo.
- echo.
- echo.
- pause
- echo.
- echo.
- echo.
- call :ColorText 0b "----- ST4 Super Nuke complete!!!! -----"
- echo.
- echo.
- call :ColorText 0f " ---BE SURE TO UNINSTALL MS SQL 2008---"
- call :ColorText 0f "from Prog & Features before running a full installation of ST4"
- echo.
- echo.
- echo.
- call :ColorText 0c "Press any key to return to your regularly scheduled programming"
- echo.
- echo.
- call :ColorText 0e " This program will now open the SQL Uninstaller."
- echo.
- echo.
- echo.
- echo.
- @echo off
- @pause
- @cls
- @color 1f
- @echo This Program will terminate once the SQL uninstaller is complete.
- @echo.
- @echo.
- @echo Select [Remove], Then [OK], Select Instance [SQL_ICCM] Then [Next], [Select ALL] then [Next], [Next], [Remove], [Next], Then [Close]
- @ "C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Release\x86\SetupARP.exe" >nul
- @ "C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release\x86\SetupARP.exe" >nul
- goto :eof
- :ColorText
- echo off
- echo %DEL% > "%~2"
- findstr /v /a:%1 /R "^$" "%~2" nul
- del "%~2" > nul 2>&1
- goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement