Created uinstall.bat, updated install.bat
Adding an uninstall.bat that, when run as administrator, will stop the apache2.4 and mysql services, delete the mysql service (which XAMPP uninstall leaves behind...), deletes the www folder and uninstalls XAMPP. Modified the install.bat script to suppress output when deleting the unnecessary XAMPP htdocs folder and added a friendly "contact us" message to encourage some feedback from our users.
This commit is contained in:
parent
2c0bbb793d
commit
4f53418e8c
20
install.bat
20
install.bat
@ -28,6 +28,7 @@
|
|||||||
REM - Apr 5, 2017 - Added mkdir for \xampp\php\logs directory (not included when installed)
|
REM - Apr 5, 2017 - Added mkdir for \xampp\php\logs directory (not included when installed)
|
||||||
REM - Jun 27, 2017 - Removed copy cgi-bin contents
|
REM - Jun 27, 2017 - Removed copy cgi-bin contents
|
||||||
REM - Sep 19, 2018 - Deleting unnecessary C:\xampp\htdocs folder.
|
REM - Sep 19, 2018 - Deleting unnecessary C:\xampp\htdocs folder.
|
||||||
|
REM - Oct 3, 2018 - Redirected deletion of htdocs folder to nul
|
||||||
|
|
||||||
mkdir c:\xampp\php\logs
|
mkdir c:\xampp\php\logs
|
||||||
|
|
||||||
@ -50,20 +51,25 @@ rename c:\xampp\php\php.ini php.ini.old
|
|||||||
copy c:\xampp\www\conf\php.ini c:\xampp\php
|
copy c:\xampp\www\conf\php.ini c:\xampp\php
|
||||||
|
|
||||||
echo Deleting unnecessary C:\xampp\htdocs folder.
|
echo Deleting unnecessary C:\xampp\htdocs folder.
|
||||||
del /F /S /Q c:\xampp\htdocs
|
del /F /S /Q c:\xampp\htdocs 1>nul
|
||||||
|
|
||||||
@echo Installing Apache service
|
@echo Installing Apache service
|
||||||
c:\xampp\apache\bin\httpd -k install
|
c:\xampp\apache\bin\httpd -k install
|
||||||
net start apache2.4
|
net start apache2.4
|
||||||
|
|
||||||
|
echo Thank you for installing Sagacity. We want to know what you think!
|
||||||
|
echo Please contact us at https://www.cyberperspectives.com/contact_us
|
||||||
|
echo.
|
||||||
|
echo If you like this tool, please tell a friend or co-worker!
|
||||||
|
echo.
|
||||||
set /p browser="Continue setup with http://localhost/setup.php? (Y/n) "
|
set /p browser="Continue setup with http://localhost/setup.php? (Y/n) "
|
||||||
|
|
||||||
set result=0
|
set result=1
|
||||||
if "%browser%"=="Y" (set result=1)
|
if "%browser%"=="N" (set result=0)
|
||||||
if "%browser%"=="y" (set result=1)
|
if "%browser%"=="n" (set result=0)
|
||||||
if "%browser%"=="Yes" (set result=1)
|
if "%browser%"=="no" (set result=0)
|
||||||
if "%browser%"=="yes" (set result=1)
|
if "%browser%"=="No" (set result=0)
|
||||||
if "%browser%"=="YES" (set result=1)
|
if "%browser%"=="NO" (set result=0)
|
||||||
|
|
||||||
if "%result%"=="1" (
|
if "%result%"=="1" (
|
||||||
start http://localhost
|
start http://localhost
|
||||||
|
54
uninstall.bat
Normal file
54
uninstall.bat
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
REM File: uninstall.bat
|
||||||
|
REM Author: Jeff Odegard
|
||||||
|
REM Purpose: Windows / XAMPP Uninstallation Script
|
||||||
|
REM Created: Oct 3, 2018
|
||||||
|
|
||||||
|
REM Copyright 2018: Cyber Perspective, All rights reserved
|
||||||
|
REM Released under the Apache v2.0 License
|
||||||
|
|
||||||
|
REM See license.txt for details
|
||||||
|
|
||||||
|
REM Change Log:
|
||||||
|
REM - Oct 3, 2018 - File created
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo This will completely uninstall Sagacity and XAMPP and delete
|
||||||
|
echo the findings database and all result files in www/tmp.
|
||||||
|
echo.
|
||||||
|
echo This cannot be undone.
|
||||||
|
echo.
|
||||||
|
set /p uninstall="Are you sure? (y/N) "
|
||||||
|
|
||||||
|
set result=0
|
||||||
|
if "%uninstall%"=="Y" (set result=1)
|
||||||
|
if "%uninstall%"=="y" (set result=1)
|
||||||
|
if "%uninstall%"=="Yes" (set result=1)
|
||||||
|
if "%uninstall%"=="yes" (set result=1)
|
||||||
|
if "%uninstall%"=="YES" (set result=1)
|
||||||
|
|
||||||
|
if "%result%"=="1" (
|
||||||
|
cd C:\
|
||||||
|
echo - Stopping Apache and MySQL services.
|
||||||
|
sc stop Apache2.4
|
||||||
|
sc stop mysql
|
||||||
|
echo - Deleting the MySQL service.
|
||||||
|
sc delete mysql
|
||||||
|
echo - Deleting the Sagacity www folder.
|
||||||
|
del /F /S /Q C:\xampp\www 1>nul
|
||||||
|
rmdir /S /Q C:\xampp\www
|
||||||
|
echo - Uninstalling XAMPP
|
||||||
|
C:\xampp\uninstall.exe --mode unattended
|
||||||
|
)
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Thank you for trying Sagacity. If you have any questions or comments, please echo contact us at https://www.cyberperspectives.com/contact_us
|
||||||
|
echo.
|
||||||
|
|
||||||
|
if "%result%"=="1" (
|
||||||
|
set /p foo="Uninstall complete. Press enter to continue."
|
||||||
|
) else (
|
||||||
|
set /p foo="Whew, that was a close one! Uninstall aborted. Press enter to continue."
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user