Rev | Line | |
---|
[17674] | 1 | @echo off
|
---|
[17949] | 2 | CD /D "%~dp0"
|
---|
[22532] | 3 |
|
---|
| 4 | :checkUserPermissions
|
---|
[22573] | 5 | echo Checking if the Greenstone directory is writable ...
|
---|
[22577] | 6 | (echo This is a temporary file. It is safe to delete it. > "testing.tmp" ) 2>nul
|
---|
| 7 | if exist "testing.tmp" goto deleteTempFile
|
---|
[22573] | 8 | if "%1" == "Elevated" goto printWarning
|
---|
| 9 | echo ... FAILED
|
---|
[22577] | 10 | echo The uninstaller cannot write to the Greenstone directory (%CD%)
|
---|
[22573] | 11 | echo Requesting elevated status to become admin user to continue.
|
---|
[23210] | 12 | ..\bin\windows\gstart.exe %0 Elevated %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
[22532] | 13 | goto done
|
---|
[22573] | 14 |
|
---|
| 15 | :printWarning
|
---|
| 16 | echo ... FAILED
|
---|
[22577] | 17 | echo The uninstaller cannot write to the Greenstone directory (%CD%).
|
---|
[22573] | 18 | echo Attempting to continue without permissions.
|
---|
| 19 | goto shiftElevated
|
---|
[22532] | 20 |
|
---|
| 21 | :deleteTempFile
|
---|
[22573] | 22 | echo ... OK
|
---|
[22577] | 23 | del "testing.tmp"
|
---|
[22532] | 24 |
|
---|
| 25 | :shiftElevated
|
---|
| 26 | :: Shift "Elevated" (one of our own internal command words) out of the way if present
|
---|
| 27 | :: so the command-line is as it was when the user initiated the command
|
---|
[22573] | 28 | if "%1" == "Elevated" shift
|
---|
[22532] | 29 |
|
---|
[23210] | 30 | if exist ..\bin\windows\search4j.exe ..\bin\windows\search4j.exe -p ..\packages\jre -l .\uninst.jar
|
---|
[18071] | 31 |
|
---|
[23210] | 32 | if exist ..\gs2build\bin\windows\search4j.exe ..\gs2build\bin\windows\search4j.exe -p ..\packages\jre -l .\uninst.jar
|
---|
[18071] | 33 |
|
---|
| 34 |
|
---|
| 35 | if exist uninst.flag (
|
---|
| 36 |
|
---|
[23210] | 37 | rd /s /q ..\packages\jre
|
---|
| 38 | rmdir ..\packages
|
---|
[18071] | 39 |
|
---|
[23210] | 40 | if exist ..\bin\windows\search4j.exe (
|
---|
| 41 | del ..\bin\windows\search4j.exe
|
---|
| 42 | rmdir ..\bin\windows
|
---|
[18498] | 43 | )
|
---|
[23210] | 44 | if exist ..\gs2build\bin\windows\search4j.exe (
|
---|
| 45 | del ..\gs2build\bin\windows\search4j.exe
|
---|
| 46 | rd /s /q ..\gs2build
|
---|
[19461] | 47 | )
|
---|
[18071] | 48 |
|
---|
| 49 | del uninst.jar
|
---|
| 50 | del uninst.flag
|
---|
| 51 | del Uninstall.*
|
---|
[23210] | 52 | del *.uninstall
|
---|
[23242] | 53 | rmdir /S /Q ..\bin
|
---|
| 54 | rmdir /S /Q ..\tmp
|
---|
| 55 | rmdir /S /Q ..\ext
|
---|
| 56 | rmdir /S /Q ..\uninstall
|
---|
[18071] | 57 |
|
---|
[23210] | 58 | cd ..
|
---|
[18071] | 59 | if NOT EXIST *.* (
|
---|
| 60 | set GSDEL=%CD%
|
---|
| 61 | cd ..
|
---|
| 62 | rmdir %GSDEL%
|
---|
| 63 | )
|
---|
| 64 |
|
---|
| 65 | )
|
---|
[22577] | 66 |
|
---|
| 67 | :done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.