1. 程式人生 > >WIN7以上系統安裝VB6的解決辦法,附上個批處理。

WIN7以上系統安裝VB6的解決辦法,附上個批處理。

vb6.0 rem IT 發現 ech class sys win7安裝 start

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

WIN7以上系統安裝VB6的解決辦法,附上個批處理。