Software Installer package with database integration issue - visual-studio-2013

Recently by using Visual Studio 2013 I have developed a program that displays alarm information based on its time and alarm tone settings. Those settings and files are stored in MySQL database.
The issue is:
Is there any way to install this application to another computer without requiring to export the database, install MySQL database and configuring it.
Just I want to Install the required database file and application at ones including to the Software installation package. or what you will advice me.

Using the Installshield Lite packaged with VS2013 you can create a setup that will include the setup of applications such as MySQL.
When the setup runs, it will install MySQL with the parameters provided. If you configure the application to use silent install as discussed here: https://dev.mysql.com/doc/refman/5.1/en/windows-installer-msi-quiet.html then the installation will be seen as 'part of' your setup.
For the settings, I would recommend creating a setup application (console app) that will read a .sql file etc and configure the database. This too can be run as a pre-requisite of your installation.
You can also do this all manually (i.e. write your own setup application that will call MySQL setup using Process class, install MySQL, create project folder, create shortcuts etc). The Installshield is not fully functional and a gets a lot of bad press, but will do the job for a quick/simple install.

Related

How to automatically update an application installed with Inno Setup

I have an executable application setup.exe for Windows that I realized with Launch4j/Inno Setup based on Java.
I often frequently release new versions and bug fixes.
I would like to know if there is a mechanism to install updates automatically?
Inno Setup does not have any built-in mechanism for implementing automatic updates.
You need to implement that yourself:
Make your application check for new versions (against your application webpage?). E.g. on startup (on a background thread?)
If the application detects a new version, make it download an installer to a temporary location.
Make the application execute the downloaded installer. You can make the installer run in silent mode (/silent switch). The application should close itself, to unlock any files it is using, to allow files update.
This approach will need the update installer to prompt for Administrator privileges. If you need the update to proceed completely seamlessly, you will have to implement a service. For that, see Deploying application with .NET framework without admin privileges.

How to Deploy a Windows Service using Visual Studio 2017 Community

Working with VS2017 Community I have written a service that works on my local machine. I followed the instruction here:
https://learn.microsoft.com/en-us/dotnet/framework/windows-services/walkthrough-creating-a-windows-service-application-in-the-component-designer
and installed it successfully using Installutil.exe (as per instructions in above link). All good.
I now want to deploy that across six servers in our organisation. In Microsoft's documentation about installing services (https://learn.microsoft.com/en-us/dotnet/framework/windows-services/how-to-install-and-uninstall-services) it says:
If you’re a developer who wants to release a Windows Service that users can install and uninstall you should use InstallShield
and links to a page that applies to VS2012 (can't post any more links as my reputation<10)
I have downloaded and installed the "Microsoft Visual Studio 2017 Installer Projects" package, which allows me to create a Setup Project. When I run it, it installs the project output correctly (i.e. copies the exe & dll files to the correct folder in Program Files) but does not create the service.
There's a detailed post about deploying services on this site (question 9021075) but when I follow those instructions I get a 1001 error on Install.
All the documentation I can find refers to earlier versions of VS or the previous Installer package, so I'm not even certain if I can do it with the software I am using.
So, with VS2017 Community using Microsoft Visual Studio 2017 Installer Projects, how to I create a stand-alone Installer to deploy a service that works correctly when installed locally using InstallUtil?
Or can I use InstallUtil on the target machines? I think I'd need to install Visual Studio on them for that, which I'd prefer not to. Is there a quicker way?
I only have 6 servers to install this on, so even some manual work-around might do.
Thank you for the responses. I now have a solution. I found InstallUtil on the Target Server (in my case it was in C:\Windows\Microsoft.NET\Framework64\v4.0.30319 but search will find it). I copied and added that to my project as content so when I now deploy it, I have InstallUtil in the same folder as my EXE.
To install, I run CMD as admin, cd to project folder and issue command:
installutil.exe myService.exe
This is a one-off task. Once the service is working, to update it I just need to stop it, upload the new myService.exe (& any DLLs) to overwrite the old ones and restart it again.
Further information about settings you're using for the serviceProcessInstaller1 and serviceInstaller1 files will be needed to debug this issue, as the 1001 error raised by the installer is a generic error.
An alternative way of doing this is to use Topshelf, which is a framework for hosting services written using the .NET framework. It simplifies the creation of services, allowing developers to create a simple console application that can be installed as a service using Topshelf. The reason for this is simple: It is far easier to debug a console application than a service. And once the application is tested and ready for production, Topshelf makes it easy to install the application as a service.
Alternatively, you could use InstallUtil.exe. It is part of the .NET Framework, so no need to install Visual Studio.

Is there an easy way to distribute the Access Database Engine

I'm using an Access Database (accdb) with my VB 2010 Application
I know I need to install the Access Database Engine on each workstation that needs to run my program.
However, I can see a logistical nightmare if I have to manually install the Access Database Engine on 100+ workstations manually.
I know a MSI doesn't exist. I'm looking for a solution to automate the installation of the Database Engine when the software installs.
Has anyone else overcome this problem.
If your application does not use any database features specific to the .accdb file format then you could greatly simplify matters by using an .mdb file to store your data. You could target your VB.NET project to the x86 (32-bit) environment and have it use the Microsoft.Jet.OLEDB.4.0 provider that is included with every Windows install. That way you could just distribute your app without having to worry about installing ACE.

Why is the SQLite provider missing from the Server Explorer Add Connection dialogue?

I am following the article Using SQLite Embedded Database with Entity Framework and Linq-to-SQL, and have tried installing the SQLite provider, first using the System.Data.SQLite NuGet package, and then by installing the provider via the Setups for 32-bit Windows (.NET /Framework 4.0) installer package (for v1.0.79). After both installs, and a system restart, I still see no SQLite Database File provider in the Add Connection dialogue from Server Explorer.
I can proceed by manually creating a connection string and using external tools to create my SQLite database file, but I still would like to know what is wrong why I do not have the advertised design time support for SQLite despite having installed the latest provider. What could be wrong here?
Ensure the data tools for visual studio were installed correctly as per:
http://www.basarat.com/2010/05/sqlite-for-visual-studio-2010.html
There are various fixes listed, making sure there weren't older tools installed first, etc.
I'm going to give it a try, but the article may help you out.

Install a SQL Server database to a client's machine

I need to install a SQL Server 2008 database on several user machines. The users are not technically proficient, so I cannot create a script and just give it to them. I need to be able to create an executable that will create the database. The executable will check if the user has SQL Server 2008 Express installed, then install the database. The executable will install the database using Integrated Security, so I don't need the user's id or password.
I tried using the database project in Visual Studio 2010, but it just creates scripts.
Is there an open source solution to creating an executable that installs SQL Server databases?
May I suggest that you look at embedding SQLServer 2008 Express within your application.
Check the Microsoft link here.
Then you can check for an SQL instance and install one if it doesn't exist when the program first starts up.
A simple way would be to use SQL Server Management Objects (SMO) to create a .NET console application that creates the database.
Depending on your security rights on your user's machines you may be able to run the app from your workstation and deploy directly to their machines.
SMO can also be driven by powershell.

Resources