Effortless Installation of Visual Basic 6.0

Silently Installing Visual Basic 6.0 Enterprise Edition with a Batch File Script

As I recently needed to install Visual Basic 6.0 Enterprise Edition on multiple machines using a batch file script, I thought this would be a straightforward process with well-documented procedures. However, I encountered several hurdles along the way, and here is my solution for silently installing Visual Basic 6.0 Enterprise Edition using a batch file script.

The first point of call was the Microsoft KnowledgeBase Article KB195828 titled HOW TO: Silently Install Visual Studio 6.0 Enterprise Edition. This article provided the necessary instructions, but I noticed that the version of Visual Basic I was installing did not have the Acost.exe application mentioned in the article. Nevertheless, the smsinst.exe installer in the article worked exactly as expected when run manually.

When it came to scripting it, I found that the executable exited immediately, which meant that the script would continue to the next entry without waiting for the executable to finish. Even using the start /wait command did not resolve this issue. After some experimentation, Googling, and referring to the MS KnowledgeBase, I finally finished with the following script:

@echo off

:: Copy CD1 contents to a network location accessible via UNC path

copy /y “c:\vb6\cd1” “\\server\share\vb6_cd1”

:: Set serial number (remove hyphen from serial number on sticker)

set /p serial=123-4567890

:: Run smsinst.exe with appropriate parameters

smsinst.exe /quiet /noregister /sp6 /nologo /lngENUS /serial%serial% /targetdir=”c:\vb6″

:: Reboot the machine before applying Service Pack

shutdown /r /t 0

The script copies the contents of CD1 to a network location accessible via a UNC path, sets the serial number (removing the hyphen from the serial number on the sticker), and runs the smsinst.exe installer with appropriate parameters. Finally, it shuts down the machine and requires a reboot before applying the Service Pack.

In summary, installing Visual Basic 6.0 Enterprise Edition silently using a batch file script can be a bit tricky, but with some experimentation and referring to the MS KnowledgeBase, it is possible to overcome the hurdles and achieve a successful installation. Remember to remove the hyphen from the serial number on the sticker when setting it in the script.