Microsoft VS Installer -> Install my Software and SQL database - installation

I made a Setup.exe for my software using "Microsoft Visual Studio Installer Projects".
My software uses Microsoft SQL Server and I also need it to be installed, then I went in my Setup.exe properties and selected "SQL Server 2019 Express LocalDB" to be installed also, but when I run the setup, it doesn't install the SQL Server on my machine.
How can I make this Setup.exe to install my software and also SQL Server at same time?

When you build a setup project with prerequisites the resultant output contains two files one is Setup.exe and the other is your project name . msi. The setup exe is responsible to check for prerequisite installed on a user system and prompt to install one if it doesn't exists, after which it launches your MSI automatically.
If you are using pre-available prerequisite in your project then they have system checks (if dependency already installed) pre-defined, but if you use your own bootstrap package then you have to write the checks for them yourself.
What I am assuming here is that you already have sql server installed on your system that is why you are not getting a prompt for its installation. Otherwise on any other system where sql server will be missing the exe will install it.

Related

How to generate vcvarsall.bat

My visual Studio 2015 installed without vcvarsall.bat.
This is not about how to find this file and I am also not a python developer.
MSDN states at the bottom of this page:
The vcvarsall.bat file can vary from computer to computer. Do not
replace a missing or damaged vcvarsall.bat file by using a file from
another computer. Rerun Visual Studio Setup to replace the missing
file.
I am running the installation through our local IT department so I only get a fixed version of the setup. It looks like this setup does not install the batch file.
I wonder what other means of generating this "file" (actually it is several files and a folder structure) there are - how does the visual studio setup generate this file and is that generation possible without running the whole setup?
You have some option to "install" vcvarsall.bat.
The obvious to rerun VS setup and add c++ features (maybe your IT dep is kind enough and...)
Install visual c++ build tools
Install windows sdk (select c++ related components)

SQL Server 2012 doesn't install silently in Advanced Installer 11.4.1

My program needs SQL Server 2012 Express. So I added "Microsoft SQL Server 2012 Express" in feature-based as you can see here :
I need to install the SQL Server Express in the background without any wizard installation so I added these parameters to my setup file :
SQLEXPR_x64_ENU.exe /qs /ACTION=Install /FEATURES=SQLENGINE
/INSTANCENAME=SQLEXPRESS /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM"
/SQLSYSADMINACCOUNTS="Builtin\Administrators"
/AGTSVCACCOUNT="NT AUTHORITY\Network Service"
I added these parameters to install command lines textboxes. As you can see here:
But when I build the project and install the setup file, SQL Server Express doesn't get installed - why?
Best regards
You cannot install SQL Server as a feature-based prerequisite because of the changes its own installer does on the machine. In the online user guide from Advanced Installer you can find a guide on other options to install SQL Server Express with your application

How to install redistributable with visual studio setup?

I wish to make my installer (visual studio setup) to install redistributable (Visual C++ 2013 redistributable x86) in case it isn't installed on the PC or install the necessary dll for my program. I don't wish to set a launch condition.
If possible, I wish that the installation of the redistributable to be silent.
Any suggestion ?
That's what the Prerequisites button is for in the setup project's Properties. You'll need to set a configuration (such as Release) before you see that button. That's where you add the VC++ runtimes. That will generate a setup.exe that users run - it will install any of those prerequisites and then install your MSI file.
To make it silent you'd need to get into the manifest file that describes the command used to install the runtime, and change it to a silent command. There used to be a tool called the Bootstrap Manifest Generator that would do that kind of thing, if you can still find it.
There's no support I know of for any of the following, but this is how the VS bootstrapper works, so mangle at your own risk :)
You could open the built setup.exe as a file with Visual Studio and examine the resources - under 41 there's a setupcfg that's the specicification for the prereqs. You'd need to export it, alter it and re-import it.
Alternatively, the template for the standard prereqs that this uses comes from the SDK in architecture-dependent locations such as Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages\vcredist_x86\product.xml so if you go in that Xml file and find the correct VCRedistInstalled settings and command lines, make it silent, and it should propagate into the setup.exe when you do the build. This is unsafe because a) you've altered a file so that will now not be updated by any SDK updates b) The file doesn't match the one installed by the SDK and there may be installer repair issues and c) Every bootstrapper build will be affected.
You can use Merge modules and add it to your setup/msi which will install quietly

Command for Elastic Beanstalk configuration to install Visual C++ Redistributable

I am searching for a command that I can use in Elastic Beanstalk configuration file to install Visual C++ Redistributable for Visual Studio 2012 which I need for my web project to run.
I tried installing using msi which I built from the exe and put on S3 but it returned timeout:
The following instances have not responded in the allowed command timeout time (they might still finish eventually on their own)
And I still get the error:
Could not load file or assembly 'Magick.NET-x86.DLL' or one of its dependencies. The specified module could not be found.
Magick.NET needs the Visual C++ Redistributable for Visual Studio 2012 in order to run. Installing it manually is not an option as I need it pre-installed for auto scalability. Thanks.
Servers run on Windows Server 2012 / IIS8
I recently encountered the same problem. What I ended up doing was creating scripts that are bundled with the deployment that download the redistributable from my S3 store and then install on the server during deployment. Here is what I did:
Download the redistributable from http://www.microsoft.com/en-us/download/details.aspx?id=30679
Upload the redistributable to your S3 store and note the URL location.
In the .NET project, create a folder named .ebextensions at the
top level of the project (i.e., at the same level as the App_data,
App_Start, Content, etc. folders)
Create a file named myapp.config (replace myapp with whatever you like). I actually created two config files (myapp-1.config and myapp-2.config) because for whatever reason the deployer didn't like the commands in Step #5 to be in the same file (I'm still learning this so I most likely screwed something up, but this worked for me).
In the config file, place the following (files into myapp-1.config and commands into myapp-2.config):
files:
"c:\\somedirectoy\\vcredist_x64.exe":
source: https://s3.amazonaws.com/yours3location/2012vcredist_x64.exe
commands:
instlVC:
command: c:\\somedirectory\\vcredist_x64.exe /q /norestart
Now, when you deploy to the Elastic Beanstalk from Visual Studio 2012, the amazon deployment process will download the vcredist_x64.exe from S3 and then run the installer in quiet mode (no prompts, etc.).
Hopefully this helps and I welcome any improvements or suggestions on this approach.

How can I create a Visual Studio Setup Project MSI that can be installed unattended via AD Group Policy?

if i want to install a MSI, created by Visual Studio 2005, via Active Directory Group Policy:
What requirements must be met by the Setup Project?
How can I specify the installation path? Is this a part of the Group Policy setting? Or do I have to create a special "silent install" version of the MSI?
Thanks!
I found out that it is possible to specify the installation path with a custom property called "TARGETDIR". The unattended installation can be tested with:
setup.msi /passive TARGETDIR="C:\whatever"
There is a command MSIExec that installs MSI installers automatically. This command is what you would use with the Policy. Any MSI should be compatible with it.
You have a number of options for building installers going with Microsofts default setup projects or something more verbose like Wix.

Resources