@ECHO OFF :: Run Gvim as source viewer from Opera, with our preferences loaded as they :: would be when running Gvim normally. This batch script is only for Win XP. FOR /F "usebackq" %%U IN (`C:\WINNT\System32\solidify "%USERPROFILE%"`) DO set MyHome=%%U% CALL :StartWhr %1 rem inder main thread of execution proceeds from here to Gvim invoke. GOTO RUNGVIM :SOLHO set STIN="%~fs1"\MYDOCU~1 GOTO :EOF :StartWhr SET WHLSTR=%1 SET CRITERION=%WHLSTR:~-15,4% :: ...Opera\Opera7\profile\cache4\opr00N3Y.html" is typical. if NOT "\opr" == "%CRITERION%" SET STIN=%~dps1 if "\opr" == "%CRITERION%" CALL :SOLHO "%USERPROFILE%" GOTO :EOF :RUNGVIM START /D%STIN% C:\AdditionalPrograms\vim6\vim63\gvim.exe -U %MyHome%/APPLIC~1/Vim/_creamrc -c ":colorscheme Autumn | cd %STIN%" %1