Hello All,
I've assembled a .manifest file that allows for Side-by-Side, registration-free execution of compiled VB6 programs using any (or all) of the following OCX files:
The name of this manifest file (attached) is "AllPurposeManifest.txt". To use it, download it, and then rename it to the name of your compiled VB6 program, with the EXE and appending a .manifest after that. For instance, if your compiled program was named "MyProg.exe", then the manifest file would be named "MyProg.exe.manifest".
Now, to use it, this manifest file MUST be in the same folder with your EXE file. In addition, all of the above OCX files must also be in the same folder with your EXE file. These OCX files are somewhat version dependent. Also, since they're all redistributable, I've zipped them up and put them in a place you can down load them. To download them click HERE.
This manifest file is an ANSI Notepad readable file, so feel free to take a look at it.
Also, I've attached the source code to an example project named AllPurpose (attached as AllPurposeDemo.zip). To see this demo in action, download it, compile it, rename the manifest file to AllPurpose.exe.manifest, place this manifest file in the folder with the exe, place all the OCX files in this folder as well, and then execute it. (I didn't include the RichTextbox in this demo because that creates a binary frx file, and these binary files are not allowed in attachments in these forums. However, it is referenced and you can include it yourself on the demo form if you like.)
What are the advantages of doing this? First, it allows you a way to distribute your program without the need for any installation. In other words, you could just zip everything up (possibly excluding your source code files), and then unzip it on any modern Windows machine in a folder of your choice, and it'll just RUN! Secondly, keeping track of what OCX files you're using keeps you out of DLL hell. If you "install" your OCX files, there's nothing to prevent some other installer from "upgrading" them, potentially breaking your program. Just as an FYI, other than your own data files, all that would need to be in your distributable ZIP file is your EXE program, the manifest file (correctly named), and the OCX files. The VB6 runtime files are already pre-installed on all late versions of Windows.
There are also a couple of other things worth noting. First, this isn't necessarily the only way to assemble a registration-free (no installation needed) VB6 program. Krool (a participant in these forums) has done incredible work to develop VB6 custom controls (API created) for most of the controls people use from OCX files. If his work meets your needs, you could throw it all into your project, not having any references to OCX files, and you'd have a registration-free program.
There are also things other than side-by-side (runtime) registration of OCX files that can be placed in these manifest files. I'm not going to go into any of that here, but I will say that Dilettante (another participant in these forums) is quite knowledgeable about this information, and I will refer you to him if you'd like to know more (that is, if he's willing).
Lastly, if there's a "mainstream" OCX that you're using that's not in the above list, post the name of it in this thread, and I'll see about including it in the attached manifest file.
As a final note, none of this has anything to do with the VB6 IDE. This will only affect compiled programs.
Enjoy,
Elroy
I've assembled a .manifest file that allows for Side-by-Side, registration-free execution of compiled VB6 programs using any (or all) of the following OCX files:
- tabctl32.ocx
- comdlg32.ocx
- richtx32.ocx
- mscomctl.ocx
- mscomct2.ocx
The name of this manifest file (attached) is "AllPurposeManifest.txt". To use it, download it, and then rename it to the name of your compiled VB6 program, with the EXE and appending a .manifest after that. For instance, if your compiled program was named "MyProg.exe", then the manifest file would be named "MyProg.exe.manifest".
Now, to use it, this manifest file MUST be in the same folder with your EXE file. In addition, all of the above OCX files must also be in the same folder with your EXE file. These OCX files are somewhat version dependent. Also, since they're all redistributable, I've zipped them up and put them in a place you can down load them. To download them click HERE.
This manifest file is an ANSI Notepad readable file, so feel free to take a look at it.
Also, I've attached the source code to an example project named AllPurpose (attached as AllPurposeDemo.zip). To see this demo in action, download it, compile it, rename the manifest file to AllPurpose.exe.manifest, place this manifest file in the folder with the exe, place all the OCX files in this folder as well, and then execute it. (I didn't include the RichTextbox in this demo because that creates a binary frx file, and these binary files are not allowed in attachments in these forums. However, it is referenced and you can include it yourself on the demo form if you like.)
What are the advantages of doing this? First, it allows you a way to distribute your program without the need for any installation. In other words, you could just zip everything up (possibly excluding your source code files), and then unzip it on any modern Windows machine in a folder of your choice, and it'll just RUN! Secondly, keeping track of what OCX files you're using keeps you out of DLL hell. If you "install" your OCX files, there's nothing to prevent some other installer from "upgrading" them, potentially breaking your program. Just as an FYI, other than your own data files, all that would need to be in your distributable ZIP file is your EXE program, the manifest file (correctly named), and the OCX files. The VB6 runtime files are already pre-installed on all late versions of Windows.
There are also a couple of other things worth noting. First, this isn't necessarily the only way to assemble a registration-free (no installation needed) VB6 program. Krool (a participant in these forums) has done incredible work to develop VB6 custom controls (API created) for most of the controls people use from OCX files. If his work meets your needs, you could throw it all into your project, not having any references to OCX files, and you'd have a registration-free program.
There are also things other than side-by-side (runtime) registration of OCX files that can be placed in these manifest files. I'm not going to go into any of that here, but I will say that Dilettante (another participant in these forums) is quite knowledgeable about this information, and I will refer you to him if you'd like to know more (that is, if he's willing).
Lastly, if there's a "mainstream" OCX that you're using that's not in the above list, post the name of it in this thread, and I'll see about including it in the attached manifest file.
As a final note, none of this has anything to do with the VB6 IDE. This will only affect compiled programs.
Enjoy,
Elroy