MSDN for VB6 和VC6真是杯具,
里面的索引页是*.col格式的,
而且索引页的详情又放在 系统分区
%SystemRoot%\help\hhcolreg.dat
还有
C:\ProgramData\Microsoft\HTML Help\hhcolreg.dat
里面
重装系统后害我不得不重装了MSDN
看到 一个绿色版setup 的批处理才明白.
@echo off
:_start
Set CPath=%CD%
Set rCPath=%CPath:\=\\%
set findStr=MSDNCpathFalg
set newStr=%CPath%\MSDNVB
set dFile=hhcolreg.dat
set dTmp=hhcolreg.tmp
echo 正在复制文件到 %SystemRoot%\help\hhcolreg.dat
for /f "delims=" %%i in (%dFile%) do (
Setlocal EnableDelayedExpansion
set "varTmp=%%i"
set "varTmp=!varTmp:%findStr%=%newStr%!"
>>%dTmp% echo,!varTmp!
Endlocal
)
if exist %SystemRoot%\help\hhcolreg.dat (
copy /y "%SystemRoot%\help\hhcolreg.dat" "%CPath%\hhcolreg.bak")
copy /y "%CPath%\hhcolreg.tmp" %SystemRoot%\help\hhcolreg.dat >nul
del /s "%CPath%\hhcolreg.tmp" >nul
call %SystemRoot%\hh.exe %newStr%\msdnvs98.col
pause
exit |