WIN7以上系统安装VB6的解决办法,附上个批处理。

1、安装时显示oledb32r.dll不能在系统注册数据库中注册
在C盘查找oledb32r.dll,改名为oledb32r-2.dll即可,dll冲突了。

2、WIN7安装VB6提示VB98ENT.STF错误的解决办法:
发现是 setupwiz.ini文件参数错误,办法:
1.打开setupwiz.ini,把"acme=acmboot.exe"改为"=setup\acmsetup.exe";
2.STF=setup\vb98ent.stf改为=setup\acmsetup.stf, 保存退出;
3.进入setup文件夹,把vb98ent.stf改名为acmsetup.stf;
4.把 vb6.0\SETUP 下的所有文件复制到vb6.0,目录下,会提示有个文件是否要替换,我是选择了替换。
5.运行setup.exe即可。

 安装VB6批处理文件(请拷贝到VB6所在的目录双击运行).bat

@echo off
cd /d %~dp0
ren "C:\Program Files (x86)\Common Files\System\Ole DB\oledb32r.dll" oledb32r-2.dll
ren "C:\Program Files\Common Files\System\Ole DB\oledb32r.dll" oledb32r-2.dll
echo n|copy /-y %~dp0setup\VB98ENT.STF %~dp0setup\acmsetup.stf
echo n|copy /-y %~dp0setup\*.* %~dp0
rem 替换setupwiz.ini中的错误参数:
@echo off & setlocal enabledelayedexpansion
del new_1.txt
for /f "tokens=*" %%i in (SETUPWIZ.INI) do (
if "%%i"=="" (echo.) else (set "line=%%i" & call :chg)
)>>new_1.txt
attrib -s -h -r %~dp0setupwiz.ini
move new_1.txt setupwiz.ini
start setup.exe
exit

:chg
rem 这个是保留空行
set "line=!line:acmboot.exe=acmsetup.exe!"
set "line=!line:vb98ent.stf=acmsetup.stf!"
echo !line!
goto :eof

 

猜你喜欢

转载自www.cnblogs.com/liuzhaoyzz/p/9098377.html
今日推荐