I am currently working on a java project and i want to generate an installer which can add the program to the windows context menu automatically with maven. I had no luck with the generators i tried, some of them couldn't create windows registry entries (which are needed for the context menu), others were not free (it is only a side project so i don't want to spend money). I am already able to generate a .exe file with all dependencies wrapped inside, so i only need to generate an installer that copies this file to a user specified location, create some config/log folders in appdata (which can also be done by the application on first run) and create some registry entries to enable the context menu. I know java is not the language that installers are used most for, but maybe somebody had a similar use case and can provide some maven plugin that will generate the installer.
Thanks in advance
Related
So a Windows Application Packaging Project in Visual Studio can have references to multiple projects, which will be included in the package. One of those references/applications then gets defined as the entry point/startup application.
Is it possible to know where the other application in the package is located, so that I can start it from the entry point/startup application?
Hope this makes sense...
I assume you want to programmatically launch your other application, right?
By design, the binaries from an installation folder of an MSIX folder are not directly accessible through their direct path. I know this is how we did it for Win32 applications, but for containerized ones things have changed.
The correct way to run an app, installed by an MSIX package, programmatically or from the command line is with the use of an execution alias. The following article contains more details about how an execution alias works and how you can define it in your package, no matter the tool you use to build the MSIX package.
- App Execution Alias
Also, here is a related question on SO and another similar one.
I want to know how installation in windows works like what sort of files get created first as .dll , drivers & all.
To be more precise when we click on .exe file what happens internally?
Generally speaking, anything can happen after you click the exe. But most of the time, installer does some or most of these:
check if the needed frameworks and libraries are already installed (ex: .NET framework)
create a registry entry with the application settings and uninstaller path
extract the binaries and assets or download them
create the needed directories (ex: Program Files/SomeProgram) and move the extracted files to the proper folders
create a desktop shortcut
associate the file extensions with the program
do whatever else the program needs.. It really depends on what you are installing and what needs to be set up for the program to
function properly.
I would like to build a setup, or something like that (1 file), to deliver a single file to a target system. Plugin for an application, installable to users AppData folder.
After some research I'm still not sure in which direction to look. I can create the setup project with Visual Studio 2010, but all of the options so far seem to be way too heavy or have some flaws.
SetupProject stubbornly wants to create an application folder which I don't need, and complains about installation to user folder. Cab doesn't seem to offer automatic install, oneclick is not available for the project, etc.
Is there an easier setup technology I could use?
Requirements:
Install -> Copy 1 file to a folder
under %userprofile%\3rdpartyapp\ if
it exists (xcopy).
Uninstall -> Delete the file and also
one folder with custom settings
(rmdir \s).
Distribution -> Free for commercial
use.
Maybe I should just pack the file in self extracting c++ exe?
It may be overkill for one file, but I like InnoSetup for creating setup packages. Check it out, and see if it suits you. It is very easy to use and deploy.
Take a look at WiX toolset. It allows creating MSI-based installers, and the installer could be quite simple:
Search for %userprofile%\3rdpartyapp;
Copy the file into it, if it exists;
Fail install or maybe create it, if it does not exist.
Uninstall would be very simple: it would need to remove the installed file. To remove a subfolder of 3rdpartyapp, you can use RemoveFolderEx element.
MSI registers the installed app with Add/Remove Programs Control panel. Uninstall is handled by Windows Installer service, therefore you don't need to copy any additional files or programs to support uninstall.
I think any setup technology is too heavy for one file. I'd go with creating a simple application that would extract the file from its resources stream and copy it into %userprofile%\3rdpartyapp.
Uninstall is trickier: there should be something that can handle the uninstall process. It could be a batch or script (js, vbs) file stored somewhere in user's profile, another simple application or the same one. (Installation process can also be handled with a script.)
Is Visual Studio's Setup Wizard project able to only deploy some of the files only if it finds a certain key into the registry (a) ? If not, then maybe launch another installer file when that certain reg key is present (b) ?
(a) I have been trying to deploy a winamp plugin through VS's .msi files. 2 problems:
the path to {winamp}/plugins folder has to be obtained automatically
on failure, user should be presented with a dialog to choose where to install the plugin to
(b) In an attempt to overcome (a) the NSIS installer was used for only packaging the winamp .dll plugin; however, this introduced another issue:
if user does not have winamp installed, the NSIS generated sub-installer must be manually canceled, and this invariably causes the main VS generated installer to fail (while it shoud not, winamp is not an essential part of the good functionning of the whole app I am deploying)
I have failed in 2 ways to conditionally launch the sub-installer on a certain reg key detection (tried to look for the ProgID key of Winamp). First failure was because the ProgID key is not found even on machines that do have winamp installed (manually checked for the key, it was there), and second failure was due to the fat that such conditional launch could not be applied to just the sub-installer, but to the main installer only.
I am thinking of dumping the VS project wizard altogether and just move to NSIS installer wizard.. but I would not want to learn to script it for deploying each component of my solution. Any GUI version for it ? Or should I start learning Orca and use it on the VSPW's output .msi file ? Or what ?
Thanks
If you want to use a MSI the approach is this:
- create a search for the registry entry
- use the search result (it's stored in an installer property) to condition the components of your files
- use the same result to condition the installation folder dialog
This can easily be done in commercial setup tools. But if you want a free solution, Sandeep is right, Wix is very good.
How to run the exe file to other system?
Using VB 6
I copied the exe file to other system, then run that exe file, it not working it showing error
“component comdlg32.ocx or one its dependencies not correctly registered a file is missing or invalid”`
Can any one help me how to avoid this error?
When deploying VB6 applications, you should create a Setup, this will manage the DLL's that the VB6 application depends on. Since it is not enough to just copy the .Exe and .Dll's. You also need to register them.
The creation of the setup is included in the VB6 environment.
You can read this http://support.microsoft.com/kb/830761 which is very comprehensive.
1: http://support.microsoft.com/kb/830761 for more information.
Or if you just want the redistributable files check this kb http://support.microsoft.com/kb/290887
Copy and register the comdlg32.ocx on other system. Link: Fix Missing Comdlg32.ocx Run time Error in Portable apps.
Create an installer for your program.
Unless you are deploying your program to really old versions of Windows (prior to XP), one nice alternative is to create an XCopy package using reg-free COM. This is fairly easy for most simple programs using Make My Manifest though it can be done by hand or using other tools if you invest in a little study.
Even then a formal installer package is usually desireable though, if nothing else to create Start Menu shortcuts and set up application workspace directories.
Keep in mind that even the PDWizard is difficult to use blindly. Packaging and deployment is a topic that requires some learning investment.
Outdated or missing comdlg32.ocx runtime library is causing this error. Here is a copy of comdlg32.ocx (~60 Kb Zip). Download the file to the Desktop and extract the comdlg32.ocx to your the Windows\System32 folder.
Note: If you already have a copy of comdlg32.ocx, backup the existing file to a different folder and delete it from System32 folder.
1. Download comdlg32.zip and save to Desktop.
2. Unzip the file using WinZip or any other utility.
3. Extract comdlg32.ocx to Windows\System32 folder.
4. Type the following command from Start, Run dialog:
regsvr32 %Systemroot%\System32\comdlg32.ocx
Typically a VB 6 app will consist of an .exe some .dll libraries and a config.ini file. The exe is the starting place and it consumes the dll's and config.ini and other resources to run => you have to have all parts in the same directory for the app to run typically called "packaging" an app. E.g. An installer simply ensures that all those files in a packaged app are placed on a users computer in an Windows application directory, and creates a shortcut launch icon so that a user can click the shortcut in the start bar and the app will run.
To "package" your app (put the dll's and exe in the same folder) you can use an Add-In called "Package and Deployment Wizard":
And here is a demo of using it: https://www.youtube.com/watch?v=XT7jaoAiKDo
You can either package and create an installer and package or just create a package:
Now if the Deployment Wizard doesnt show as an add-in on your VB6 Editor Installation, go to editor's program folder and find the tools Tools folder, i.e:
Then you should be able to find the Deployment Wizard there:
Open it to use it.