textreplace -std -t bin\qgis.bat
textreplace -std -t bin\qgis-browser.bat

if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%"
if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "QGIS Desktop 1.8.0" "exec hide """%OSGEO4W_ROOT%\bin\qgis.bat"" "%OSGEO4W_ROOT%\apps\qgis\icons\QGIS.ico"
if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "QGIS Browser 1.8.0" "exec hide """%OSGEO4W_ROOT%\bin\qgis-browser.bat"" "%OSGEO4W_ROOT%\apps\qgis\icons\QGIS.ico"

if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "~$folder.desktop$" "QGIS Desktop 1.8.0" "exec hide """%OSGEO4W_ROOT%\bin\qgis.bat"" "%OSGEO4W_ROOT%\apps\qgis\icons\QGIS.ico"
if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "~$folder.desktop$" "QGIS Browser 1.8.0" "exec hide """%OSGEO4W_ROOT%\bin\qgis-browser.bat"" "%OSGEO4W_ROOT%\apps\qgis\icons\QGIS.ico"

set O4W_ROOT=%OSGEO4W_ROOT%
set OSGEO4W_ROOT=%OSGEO4W_ROOT:\=\\%
textreplace -std -t "%O4W_ROOT%\apps\qgis\bin\qgis.reg"
"%WINDIR%\regedit" /s "%O4W_ROOT%\apps\qgis\bin\qgis.reg"
