NetBeans Platform (RCP) and "Package as Installers" with serial number - installation

This is my first time using the NetBeans Platform (RCP) for an application. I would like to package the application as .exe installer, and now I know how to do that. What I do not know, is it possible to customize this NetBeans RCP installer to prompt the user for a serial number? Please, any help is greatly appreciated

The only way presently (and that I know of) to do this is to edit the installer's source. The code that is used to create an application's installer is shared between all NBP projects and as such it is probably not a good idea to do this. For reference, the installer code on a Windows 7 machine is located at "C:\Program Files (x86)\NetBeans 7.1\harness\nbi".
Another option for you is to create a "setup" wizard that runs the first time the application runs and gets the serial number then. This is also considered good practice although I have seen applications that ask for a serial number on installation. In general your installer should only be concerned with installing; activating a product should be handled in a setup process.
Edit: The NetBeans Platform has a built in Wizard located in the Dialog API. Of course, The best resource for learning about the NetBeans Platform is the http://platform.netbeans.org site. If you are using 7.1 then this is the tutorial you want.

Related

VB6 Deployment not working for Second user

I have a VB6 Application that I am deploying using Microsoft Development Environment.
The install package is working for Windows 7/10 32/64 bit.
The problem I am having is if a second user logs into windows and runs the installed app some of the controls are not working.
Forms that contain MSCOMCT2.OCX, TABCTL32.OCX and maybe others fail saying:
"Component ... or one of is dependencies not correctly registered: a file is missing or invalid"
But once again for the user that installed the app all is good.
I see in other installs there is a choice to install for only me or all users. I don't see a way to implement that in "Microsoft Development Environment", is this my problem?
What changes if you install an app for All users?
This may have to do with registry virtualization. The application may be running in some kind of compatibility mode so that the controls are not really being installed system-wide.
I'm not too familiar with those settings but it might be possible to adjust them so that the DLLs/OCX files are genuinely registered for all users and the application runs accordingly. There is a risk that if the compatibility settings were set intentionally, this could break something else.
Hopefully this is a useful starting point.
I will add that IMO installing the application not to require registration whatsoever is a much more robust solution. See How can you force VB6 to use the DLLs and OCXs from the app directory?

How do I create an installer exe with system ocx and dlls for a VB6 exe?

This question may seem really dumb, my apologies for having very minimal programming experience. We just need to make an inventory system exe given to us run and "work" on some computers.
The exe file itself is an inventory system made using Visual Basic 6. It runs fine on computers that have visual basic 6 installed.
However, on computers without VB6, we encounter crashes. The exe's themselves run fine but as soon as we perform something (logging in/clicking buttons/etc.), we get runtime errors 339. On one machine it says, "Component 'MSCOMCT2.OCX' or one of its dependencies not correctly registered: a file is missing or invalid. on another machine, we have a similar error but points to MSFLXGRD.OCX
I figured these problems may be caused by missing system files/dependencies and we need to first install those. How do I make an installer wizard (similar to those Windows app installers that installs system files alongside the actual app) for installing these missing dependencies?
You could do a lot worse than the free Inno Setup. I've used it for many VB6 projects and it's never failed me. There's a learning curve but it's a very flexible package.
I used to use (and contributed to) the WiX toolkit for this purpose.
This will build a standard .msi installer for you. Start with the heat program which will inspect your software and generate much of the WiX project for you, be sure to use the -svb6 option.
You will need to source the appropriate merge modules for VB6 as well, which will provide the components you are missing.

VB6 app: rich textbox control

I have taken responsibility of a VB6 app.
I installed the VB6 IDE on one of my older machines. When I compile the app and copy the .exe to client machines, the Rich Textbox control breaks the app and causes a run-time error.
How important is it what machine you compile an app on? Is it possible that the app is expecting a control with a different ID and therefore there is a run-time error?
You need to deploy the Rich Textbox control richtx32.ocx to the client machines. These tables show it is not part of Windows, you need to deploy it yourself.
You might want to create an install for your program.
You could look into using a manifest so that you can just copy your program and its dependencies (like richtx32.ocx).
You could just manually copy the OCX file and use regsvr32 to register the OCX. This will quickly become unmanageable if you have more dependencies or many machines to deploy onto.

Compiling the software problem

Using VB6
i created a software in vb6 with xp operating system, In my system, software is working perfectly. When i run my software in other system(xp operating system), it showing error as cannot find project or library, showing error in Date, Left...,
Now i moved to vista operating system, i try to run my software, It showing the same error.
How to solve this issue.
My software is running in my system, when i try to run my software other system it showing error and also i try to run my software in vista also it showing a same error.
What happen in my code. There is any system32 file problem?
How to solve this issue.
Sounds like you need to create an installation for your VB6 project, to install the VB6 runtime and any non-standard components used. The runtime should be present by default on Vista, so it's probably non-standard components that are missing.
Consult the answers to your own previous question in August, when you asked how to make an installation for a VB6 program. (Even that August question was already a duplicate.)
You need to also copy the controls, and referenced files to the machine running your code. Some controls and referenced files will already be on the machine, but without experience you generally will not know which files are already installed. You can look at the checked files in the Project|References and Projects|Components dialogs to see what is included in your project. You will need to scroll through the components dialog to find all referenced files, but in the references dialog all the references are organized at the top. Also, to confirm what file(s) a machine is missing you can look at the Events log. An error with the missing file will be logged. A drawback of this approach is that you will only get one missing file at a time as the Application quits on the first missing reference encountered.
Also MarkJ and Konamiman are both correct in that the VB6 runtimes are required, although it is common for other VB6 programs to have already installed it. If you are not building in-house applications you do not want to take anything granted and should build a complete install for your application.
The other computers must have the VB6 runtime in order to run applications generated with VB6. Maybe is this the problem?
The VB6 runtime can be donwloaded from here: http://www.microsoft.com/downloads/details.aspx?FamilyID=bf9a24f9-b5c5-48f4-8edd-cdf2d29a79d5&displaylang=en
Use the Package and Deployment Wizard to create a setup.exe. The Wizard will automatically include all the files you might need for distribution.

VB6 application requiring comdlg32.ocx, running on windows server 2008

I have a legacy vb6 application that needs to run on a server 2008 machine.
I have been unable to get comdlg32.ocx to register, which the application depends on. Any suggestions?
Hmm, does this link help you at all?
My only other suggestion is that often dependency walker is useful in these sorts of situations, in particular if you are running this vb6 application on a 64 bit OS then pay attention to whether or not comdlg32.ocx has all of its dependencies present as 32 bit libraries.
The obvious, but are you running Regsvr32 as an Admin?
If you do not want to bother about copying and registering the comdlg32.ocx file (for which you might need administrator rights anyway), check out following project, that shows how you can use the common dialog box (open and save) without using the ocx file and thus without need of registering it. It uses the comdlg32.dll directly with APIs, which is installed already on windows!
http://www.soft-hummingbird.com/Tutorial_VB_ComdlgAPI.php?lang=en
The File Backupper is a nice peace of software, that uses exactly this:
http://www.soft-hummingbird.com/File_Backupper.php?lang=en

Resources