I am making an installer using NSIS and my gameplan was to
Build the startup project
Copy the Files created from the bin/(x86) or bin/x64 folder and embed them in the installer
The problem is that some files do not get included. From what I have seen, these files are exclusively Microsoft dlls. Does anyone have any ideas on how I can include them?
My idea is to parse through the csProj file and loop through every file on the Item-Group -> PublishFile node, check if it is in the bin subfolder, if it is not,embed the file in the installer.
Is there a simpler/better way to do this? If not, is there atleast a class(perhaps a DTE class) that represents the contents of the csProj file so I wouldn't need to parse xml? I have looked around and I couldn't find any.
From your original post what I can understand is that, you are building some sort of C# application and want to build a installer for the same.
Now why do you need to pack Microsoft Dlls?
Microsoft do provide every redistributable packages to be installed on end-user computer. You need to analyze what are the packages you need when running your application on a computer that doesn't have Visual Studio installed.
I think you only need .Net Framework and SQL redist packages. And these things can be installed silent during installation. And this is the proer approach.
Related
A while ago I have created a program in visual studio and installed it on another computer which I was needed to install before a lot of .NET files, framework files, sqla and sdk files and more, and just then, I was able to activate the program.
It was a windowsForms application on desktop- so this is what I have tried.
Please how can I make it easier?
How can I install the program on another computer including already all of the files?
Instead of installing them separately?
Maybe on dll?
I dont know but im sure there is an easier way doing it
Though your question is not clear, you can create an MSI using WixToolSet, InstallShield,Advanced Installer, etc.
For instance, if you are using Wix, you can install the Wix Extension in visual studio, create a wix project and the compile it into an MSI with all the files you want included in the final install.
You can find many sources on the net that can give you tutorials to get you start, like codeproject
I am using Visual Studio 2013/ISLE to create a C# program with a .msi install image. When I run install from VS the program is installed in the expected location, e.g. c:/Program Files (x86)/...
I'm sure that this is something simple but I can't figure it out. A pointers would be greatly appreciated.
When you run a 32-bit installer in x 64-bit system Windows will always redirect your installer writing to c:\Program Files to c:\program files (x86). If you want to install to the non-x86 folder you will need to provide a 64-bit installer for your application.
This blog post explains why Windows does this.
It looks like InstallShield LE will allow you to write to the correct folder when your project is set to AnyCPU, but for more advanced scenario's you'll need to use the Pro version or the free Wix installer.
I assume the question is why the installation MSI fails when you run it outside of Visual Studio, but works when VS launches it?
If yes, you should first check if your ISLE project is creating an MSI or an EXE bootstrapper (that also contains the MSI). If an EXE is created this is what you should launch manually, not the MSI. In theory, a bootstrapper can act like an initialization support for the MSI and specify default values for certain properties, like an installation folder, etc...
I say in theory because I am not very familiar with ISLE, I work with other setup authoring tools, thus cannot say for sure if this stands for ISE projects too.
I just installed Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update from http://www.microsoft.com/en-us/download/details.aspx?id=14431#filelist (x86), and expected to find the merge modules to use on my machine. Unfortunately, I cannot find them at \Program Files\Common Files\Merge Modules\ folder. Any idea where I can find them please? Thanks in advance
I was able to extract the mergemodules from the downloaded .exe file using 7-zip software. After a unzipping and unpacking all the contents of the executable file, I found the merge modules, even verified the version was correct one I needed, and was able to successfully build my setup project, and install my app correctly on client machine.
I have this problem. I want to build an installer for my c# solution, that will be placed in a folder with other installation folders and files that are needed to be copied to the installed folder. So that is easy, I just copy them to the folder I create using the folder structure I want.
Now, I want also to install another program and run a .exe file I've created to unzip some files for me. For that I need to copy 2 .exe files and 2 dlls (for the exes) to the folder to which I am installing and create 2 custom actions that will use them. That I've managed to do.
After that I want to delete those 4 extra files, as the user does not need them and shouldn't even be aware they are there. How to do so? I couldn't find a way in the built in setup project preferences + I do not know how to make a custom installer class.
A bonus question, is how to make the other installer (one of the .exe files is just a plain installer) install quietly to any path? I do not want the user to see an installer pop out of my program installer.
Thanks!
Some commercial setup authoring tools support temporary files. They are extracted when the installation starts and automatically removed when the installation ends. They are never registered with Windows Installer.
You can find a list of setup tools here:
http://en.wikipedia.org/wiki/List_of_installation_software
Regarding the prerequisite, it depends on its setup package. You can install it silently only if it supports this through its command line.
Don't. You will get a ton of problems with Windows Installer trying to automatically repair your applications and such things. You might be able to solve the problem with a more advanced installer creator, such as WiX.
I have built Visual Studio Setup Project, and it contains some Merge Modules etc, now sometimes all dll files included in the project are not showing up as latest version.
After every build, I have to install every setup (5 of them) to check all dlls contain latest version files only.
Is there any API where I can analyze the content of MSI file and verify my dlls have correct version without doing install/uninstall?
Any COM interface will be helpful provided I can program some quick version check on c#.
See the Windows Installer Automation Interface - that should give you what you need.
Also, there are tools out there like Orca or LessMSI, which allow you to peek inside the generated MSI files interactively.