Getting Everyone Registered for the HMO
I have recently taken over a database project that was written in Visual Basic 3.0. I made some requested changes using Visual Basic 4.0. I installed the new application via the setup kit, and it works fine on my test site. Unfortunately, with 500 users we push out the new applications via the network. If I copy the files that the setup kit creates to the proper directories, the application does not work. It tells me it is not properly registered. How can I register the application and controls via a batch command when the application is pushed out?
Thanks,
Bill Conrad
Ah, Automated Network Deploymentdoing things automatically warms the heart of every cost accountant! Dr. GUI's HMO approves.
Registering files from a batch file is easy. The difficulty comes in ensuring that you have registered all the required filesbut more on that in a minute.
To register .DLLs and .OCXs, you will need to look to your Visual Basic CD. There, hidden under the TOOLS\PSS subdirectory, you will find two programsREGOCX16 and REGOCX32that are command line registry tools. All you need to do to register a file is pass the location and filename as a command line parameter. For example: REGOCX32 C:\Windows\System\COMCTL32.OCX. (If you have Visual C++, you can also use REGSVR32.)
Registering executables is easy. Just shell the application using the /REGSERVER command line, and voilait's registered.
Now back to the tricky part: Which files do you need to register? Here is the secret. Take a look at the Setup.Lst file generated by the SetupWizard. After certain filenames, you will see an entry like $(DLLSELFREGISTER) or $(EXESELFREGISTER). Any files that have those entries need to be registered.