- Messages
- 11
- Country
-
Sharing experiences.
I am a beginner in Qgis and Global Mapper, I have both applications, after some "errors" decides to make a script to reset the settings of both. Just as I believe there are more people interested in doing this.
Follow the script below to copy and save with the ".cmd" extension (without quotation marks).
I am a beginner in Qgis and Global Mapper, I have both applications, after some "errors" decides to make a script to reset the settings of both. Just as I believe there are more people interested in doing this.
Follow the script below to copy and save with the ".cmd" extension (without quotation marks).
@Echo off
cd\
cls
mode con: Cols=65 Lines=45
color 1f
title Reset Qgis and Global Mapper
SETLOCAL ENABLEDELAYEDEXPANSION
::
:Titulo
Set op=
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º º
echo º 1) Reset All Qgis º
echo º º
echo º 2) Delete recent Projects Qgis º
echo º º
echo º 3) Reset All Global Mapper º
echo º º
echo º 4) Delete recent Projects Global Mapper º
echo º º
echo º Q) Sair º
echo º º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
::echo Selecione uma op‡Æo : [ 0,1,2,3,4,5,6,7,8,9,D ou Q]
echo Select Option : [ 1,2,3,4,Q]
echo.
::
::set /p op= Digite sua op‡Æo?
set /p op=Press KEY option?
::Verifique se as variáveis são definidas
IF NOT DEFINED op (
GOTO :Error
) ELSE (
if /I "%op%" EQU " " ( GOTO :Error )
goto :Continua
)
::
:Continua
::Verifique se as variáveis são definidas
if /I %op% EQU 1 Goto 1
if /I %op% EQU 2 Goto 2
if /I %op% EQU 3 Goto 3
if /I %op% EQU 4 Goto 4
if /I %op% EQU Q Goto Fim
if /I "%op%" EQU "%op%" ( GOTO :Error )
::
:://///////////////////// Start Code QGIS ///////////////////////
::
:1
reg query "HKCU\Software\QGIS.old" IF %errorlevel%=="0" reg delete "HKCU\Software\QGIS.old"
::reg delete "HKCU\Software\QGIS.old"
REG COPY "HKCU\Software\QGIS" "HKCU\Software\QGIS.old" /s /f
reg delete "HKCU\Software\QGIS"
cls
goto Titulo
:2
::HKCU\Software\QGIS\QGIS2\UI
::HKCU\Software\QGIS\QGIS2\UI\recentProjects
reg delete "HKCU\Software\QGIS\QGIS2\UI\recentProjects"
cls
goto Titulo
::
:://///////////////////// END Code QGIS ///////////////////////
::
:://///////////////////// Start Code Global Mapper ///////////////////////
::
:3
reg query "HKCU\Software\Global Mapper.old" IF %errorlevel%=="0" reg delete "HKCU\Software\Global Mapper.old"
::reg delete "HKCU\Software\Global Mapper.old"
REG COPY "HKCU\Software\Global Mapper" "HKCU\Software\Global Mapper.old" /s /f
reg delete "HKCU\Software\Global Mapper"
cls
goto Titulo
::
:4
reg delete "HKCU\Software\Global Mapper\Recent File List"
reg delete "HKCU\Software\Global Mapper\Recently Used File Types"
cls
goto Titulo
:://///////////////////// END Code Global Mapper ///////////////////////
::
::----------------------------------------------------------------
::
:Error
cls
Echo.
Echo.
Echo.
:: Echo. Entrada invalida, por favor tente novamente^^!^^!^^!
Echo. Invalid entry, please try again^^!^^!^^!
Ping -n 3 localhost>nul & cls & goto Titulo
::----------------------------------------------------------------
::
:Fim
cls&Echo. &Echo.&Echo.&Echo End until the next...&Ping -n 3 localhost>nul
SETLOCAL DISABLEDELAYEDEXPANSION
exit /b