How to create a MFC Application to run setup.exe(msi installer)? - mfc

I have java application (.jar files) and created a batch file to execute the application.
Also, I created a Setup project using Visual Studio 2005 (Setup.exe, .msi).
However, it requires JRE to run. I have downloaded the jre installer (exe file) then would like to bundle it by creating a simple MFC application that calls the two installer (jre installer & Setup.exe).
Here's the list of MFC application functionality that want to create:
1) Upon execution (double click) of the MFC application, want to check if the JRE & my Java application are already installed.
2) If the JRE was found installed, get the installation path, display it to MFC's textbox then disable the textbox and JRE install button. Same with my Java application if found installed.
3) Upon clicking the install button (either JRE or my application), would like to execute the installer.
Any guidance on the right direction is appreciated.
EDIT: target OS Windows XP up

Why not use a JRE prerequisite for your installer? Perhaps this will help: Adding Custom prerequsites to visual studio setup project
This way you don't need an application which launches installers.

Related

Windows service not showing up

I have a windows service project that I inherited and need to migrate it to a new server. I have made changes to some code, and so I created a new setup project in VS 2017. I added the .exe of the service to the set up package, and rebuilt both the service and the setup projects. When I run the .msi it seems to complete installation but when I look in the Windows Services list it's not there. What am I missing?
Any help is greatly appreciated. Thanks!
The installer probably didn't run the installutil.exe program.
You can do this manually by dropping to a command prompt then navigating to the location that the installer put the .exe file. From there run this:
installutil.exe myservice.exe
where myservice is the exe file you generated.
For more information:
https://learn.microsoft.com/en-us/dotnet/framework/tools/installutil-exe-installer-tool
Also, you might need to add the installutil.exe path. It's part of the .net framework and will be found in that install directory.

How can I configure what .NET version should be installed by windows installer in VS 2017

Currently I am working on a project that needs .NET 4.0 to work properly but when I configure the windows installer and try to install it is trying to install the latest version of .NET. So how can I configure the windows installer to install the .NET version on which the project was created. Also I would like to know how to include the Visual C++ Redistributable in my installer.
When you create a setup project and add primary output of a project to the setup project, the setup project automatically detect dependencies including Microsoft .Net Framework. To see if the detected dependency is correctly what you need, you cam see the following locations:
First of all, right click on Dependencies and click on Refresh Dependencies.
Check prerequisites for your project:
Right click on setup project and choose Properties.
In Properties dialog, from the Configurations combo box choose the configuration, and repeat the following steps for both Debug and Release.
Click on Prerequisites... button to open Prerequisites.
In the Prerequisites dialog, check the desired .Net Framework version.
Press OK and Make sure you repeat above steps for both Debug and Release.
Check Launch Conditions for your setup project:
Right click on setup project and from View select Launch Conditions:
Then under Launch COnditions node, select .Net Framework node and right click and select Properties Window.
In Properties Window check the Version property for .Net Framework launch condition.

Manually deployed WinRT app behaves different compared to deployment from VS2013

I've developed a universal app for Windows 8.1 and am now trying to install the built .appx package via powershell having no problem after installing the certificate. Though when I run the installed app it behaves differently as if I deploy/install the app from within Visual Studio.
The app is using (local) REST services to obtain data from different sources. While working when starting the app from Visual Studio, it is not when I create an .appx package and install it manually via powershell. Any hints where the problem is located?

Windows, Mingw Qt Application Does Not Run On Deployed Computers

I have created a Qt application with Mingw. The application runs properly on the development computer after copying the required DLL's to the directory. However, when deploying on external computers, the application does not run at all.
Update:
In addition, the application uses Sqlite3 via QtSql.
It's quite likely you're still missing some dll.
Check the Windows event log for any errors after running the application. (Administrative Tools->Event Viewer).
Try launching the application from a command prompt window.
Try Dependency Walker.
Another thought is some missing configuration file or registry settings.
Double check against the Qt docs for deploying Windows Qt applications.

vs 2008 deployment project not working

I have a C++ console application that I want to deploy using a vs2008 setup project. When I create the setup project and add the output from my console app, the setup project detects that it needs MSVCP90.dll and MSVCR90.dll. When I build the project, those two dlls are included in the .msi file as expected.
When I download and launch the installer, everything goes as expected and the console app and the dlls are unpacked into the proper directory on the local machine.
When I try and run the app, I get the following error:
Error 1721. There is a problem with
this Windows Installer package. A
program required for this install to
complete could not be run. Contact
your support personnel or package
vendor.
I've tried compiling the app with /MT and /MD neither one works.
When I run a dependency walker against the app, it reports that it needs MSVCP90.dll and MSVCR90.dll as expected.
Finally, if I set the installer to require the Visual C++ runtime libraries, it downloads them and everything works fine.
Obviously, I would like to avoid downloading the CRT libraries.
Thanks for any help,
Jon
Check out this example on how to add the appropriate merge modules and deploy them to your target machine along with your setup.