网络上流传的cad2004绿色版缺少vba
研究了一下原版的cad2004
增加了添加vba的批处理文件.自动寻找cad2004的安装目录.
批处理文件如下.
color 3
rem xshrimp 2007.7.2
rem reg query HKCUSoftwareAutodeskAutoCADR16.0ACAD-201:804 /v RoamableRootFolder>1.txt
rem for /f "skip=4 tokens=2 delims=SZ" %%a in (1.txt) do @set cadpath=%%a
for /f "skip=4 tokens=2 delims=SZ" %%a in ('reg query HKCUSoftwareAutodeskAutoCADR16.0ACAD-201:804 /v RoamableRootFolder') do @set cadpath=%%a
set oldpath=%CD%
cd /d %cadpath%
set cadpath=%CD%
cd /d %oldpath%
copy vb6chs.dll %windir%system32
copy AcVba.arx "%cadpath%" /y
copy AcVbaRes.dll "%cadpath%" /y
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBA" /v "DESCRIPTION" /t REG_SZ /d "AcVBA Command Module" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBA" /v "LOADCTRLS" /t REG_DWORD /d 13 /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBA" /v "LOADER" /t REG_SZ /d "%cadpath%AcVBA.arx" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBACommands" /v "-VBALOAD" /t REG_SZ /d "-VBALOAD" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBACommands" /v "-VBARUN" /t REG_SZ /d "-VBARUN" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBACommands" /v "VBAIDE" /t REG_SZ /d "VBAIDE" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBACommands" /v "VBALOAD" /t REG_SZ /d "VBALOAD" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBACommands" /v "VBAMAN" /t REG_SZ /d "VBAMAN" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBACommands" /v "VBANEW" /t REG_SZ /d "VBANEW" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBACommands" /v "VBAPREF" /t REG_SZ /d "VBAPREF" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBACommands" /v "VBARUN" /t REG_SZ /d "VBARUN" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBACommands" /v "VBASTMT" /t REG_SZ /d "VBASTMT" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBACommands" /v "VBAUNLOAD" /t REG_SZ /d "VBAUNLOAD" /f
reg add "HKLMSOFTWAREAutodeskAutoCADR16.0ACAD-201:804ApplicationsAcadVBAGroups" /v "ACAD_VBA" /t REG_SZ /d "ACAD_VBA" /f
文件下载地址.
http://groups.google.com/group/gpscad/web/addvba.rar
解压缩后运行安装.bat文件即可.
作者:shlisp Cad 工具箱