PROBLEM
Note: Support for Visual Basic for Applications (VBA) for ArcMap and ArcCatalog ended with the ArcGIS 10.2.2 release, and Esri has not included VBA compatibility setups since version 10.5. See: ArcGIS Desktop and VBA Moving Forward
VBScript and JScript geoprocessing scripts do not run on supported 64-bit (x64) Windows operating systems.
On a 64-bit platform, 64- and 32-bit code cannot be combined. A 64-bit script cannot launch a 32-bit process. ArcGIS Desktop and ArcGIS Server are native 32-bit applications, so they run as a 32-bit application on a 64-bit operating system.
When creating a geoprocessing script with VBScript or JScript, use the scripting environment's standard call for initiating IDispatch objects to create the geoprocessor object to run these scripts. 64-bit Windows, by default, uses the 'Wscript.exe' 64-bit executable. The geoprocessing object cannot be initialized because it is located in the 32-bit portion of the registry.
Note: These instructions are for ArcGIS 9.x. ArcGIS version 10.0 is the last version of ArcGIS to support Microsoft Visual Basic for Applications (VBA).
The 64-bit versions of Windows include the WOW64 emulator to redirect to certain portions of the registry so that 32-bit code can be run. To run a 32-bit script, use the 'Wscript.exe' executable that is found in the \Windows\SysWOW64 directory. This runs the script in a 32-bit environment.
\windows\syswow64\wscript c:\test\BufferExample.vbs
c:\test\BufferExample.vbs
The file associations in Windows can always be reset, so they always run scripts in a 32-bit environment. However, this may cause problems for scripts that exploit any 64-bit functionality.
Note: At ArcGIS 9.2, there is native Python support for geoprocessing scripting. Using this module avoids having to use Pythonwin to run geoprocessing scripts.
Get help from ArcGIS experts
Download the Esri Support App