Browse DevX
Sign up for e-mail newsletters from DevX


Build Your Own GUI for RegSvr32-3 : Page 3




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Packaging Your Product
Before you package your project, make sure you compile it. Go to File > Make projectName.exe... and then click OK when the compile dialog opens. To run the package and deployment wizard, go to Start > Programs > Microsoft Visual Studio 6 > Microsoft Visual Studio 6 Tools > Package and Deployment Wizard. Use the Browse button to select your VBP file and click the Package button to bundle your project into a distributable cab or setup program. When the wizard asks you for package type, select standard setup package and click Next. Then you will have to select the folder in which your package will be assembled. It defaults to the folder where your project currently resides—in most cases that's fine. When it asks if you want to create the "package" folder because it doesn't exist, click OK. This is the subdirectory in your project folder where your setup files are assembled. When that's done, just click Next.

Retail applications are not developed for you personally or your specific needs, and there is always room for education and improvement when you do it yourself.
The Package and Deployment Wizard then shows you all the files it is assembling for your setup program. This is where you can add additional files, such as your readme file, or any other documentation necessary to your application. Click the Add button to add any other files and then click Next. The following screen allows you to select whether you want a single cab file or multiple files. In this case, it is a very small program so one cab file is enough. Next, you enter what you want displayed on your installation screen while setup is running for your users. I simply added the name of our program, Component Registrar. The next step in the Wizard is to choose the Windows Start menu location for your program. I usually stick with the default, which creates a folder under Programs using the name supplied in the installation screen title and then a link to your program with the same name. The next screen is your chance to select the location of your program files and controls. Unless you are putting them in a custom location, the install paths use system environment variables, such as %(WinSysPath)%, which points to the system32 directory.

After clicking Next, you need to set whether or not other programs will share your program. This effects the uninstall process. If your program is shared, it will not be removed unless all sharing programs are removed as well. Finally, supply a name by which to save the setting for this session. You can create multiple packages for your program, each using different settings, so name them intuitively. Finished At Last!
Now you can finally click Finished and let the assembly begin. Once complete, it will display a report showing how it packaged your files. There is now a batch file you can run to create another cab file—in case you updated any files in your program. This eliminates the need to run through the wizard again if you are recreating the package with the same setting.

Now you can distribute the cab file either on CD or via a file server that your users can access to install the program. All the project files, as well as the packaged cab file, are included in the code download. Whenever I come up with an idea like this, I always think someone else must have built the same thing—but in most cases, I like to build before I buy. Retail applications are not developed for you personally or your specific needs, and there is always room for education and improvement when you do it yourself.

Michael Sanchez is a Web-based software developer doing business as Libretto Software and Runtime Web Development. He currently develops applications for Sharp Healthcare.
Thanks for your registration, follow us on our social networks to keep up-to-date