Installshield and Redistributables - installation

I have .net 3.5 application
I have made basic MSI installer with installshield added .net 3.5 in Redistributables tab rebuild and checked .msi and .exe but size is same .net only added in ISSetupPrerequisites folder
Installshield does not put Redistributables in .msi?
I must send full folder (DiskImages) to my clients?

their would be no points in putting the redistribuable in the MSI since you cannot launch another msi while an msi is runing.
a good practice would be to compressed all your files in the setup.exe. it's easier to carry around and prevent anyone from replacing them with nasty stuff and launch them with admin's right.
right click on the prerequisit and open the properties
Now specificly for the .net 3.5, since it's a windows feature on most of the modern OS (anything but xp...) the installation of the module will failed. I would suggest making a launch condition validation the presence of the registry key HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5|Version. like that
it will make your installer smaller and probably more usefull since you can customize the error message to explain how to activate it.

You can compress everything into the .exe file (select compressed, and "extract from setup.exe" as appropriate), but since Windows Installer does not handle prerequisites, it cannot be just the .msi file.
If you stick to the uncompressed build you described, then yes, you must send the full contents of at least the Disk1 folder (also any other Disk folders if there are any; they're typically only used for multiple-disk media scenarios).

Related

add own path to the targetpath during installation

I want to attach my own folder name to the "DefaultLocation" during msi installation (using VS 2005). Currently all programs installs at "C:\Program Files (x86)". I want to append some "xyz" path to the installation path during installation. So, once the user clicks next, the path for the installation should be "C:\Program Files (x86)\xyz".
Can anyone tell me how to do this in the windows installer.
The short answer is no, because here is nothing in Visual Studio setup projects to support that. You'd need the ability to change the target directory in the UI sequence after that dialog, that's what's missing.
VS setup projects are limited in their support for all the features of Windows Installer, so migrating to a different tool would be useful if this is the kind of customization you're looking for.
Could anyone tell you how to do this in Windows Installer? Technically yes. You'd need somebody who knows enough about the insides of MSI files generated by VS to design a solution (a custom action based off the Next button?) and change the MSI file manually to do it, and how to repeat that after every build (a post build script), and for you or your company to understand enough to fix it if it stops working. That doesn't seem practical compared to just using a tool that will let you do it. My apologies for the editorial but if VS doesn't support it your choices are limited.

How to create my an installer for my DLL?

I am currently using Visual C++ to develop my DLL program. This DLL also uses outside executables inside my local hard drive.
When doing testing, I manually install the DLL using this command regsvr32 filename.dll at the Windows command prompt.
What I would like to do now is an installer, like the Installshield etc. So, after this I can easily install it on other Windows machines without the need to manually use the command prompt, copying those separates executables into the hard drive and so on.
Is there a way to do this the open source way? or Is it available inside Visual Studio? Need advice on best practice.
Another possibility since you're already using VS, you can create a "Setup and deployment project", found under "Other Project Types". This allows you amongst other things to select the output of another VS project (in the same solution), add registry entries, package files from the file system, and register (regsvr32) files. To register a DLL (once you have added it to the project), change the "Register" entry on the "Properties" Window to vsdrfCOMSelfReg. However if you're packaging other executables off the hard drive, I'm not sure how you would make sure that they run. You prob have to make sure that you package all their run-times and dependencies.
AFAIR this functionality is not available in the express editions of VS.
WiX is open source, and there's a free (no cost) version of InstallShield available for Visual Studio 2010, so both.

Visual Studio Setup project - force installation of a .DLL?

I have an update to third party .DLL that must be installed onto my clients' computers. We currently employ automated installs via MSI that are created in Visual Studio 2010
Unfortunately, the third party .DLL was versioned incorrectly and file version of it was not increased by the provider (they only increased assembly version). The third party provider is Microsoft, so waiting on them to fix the issue is not realistic. We need to get the new .DLL to people now and within one MSI update. Right now, MSI update is not overriding the .DLL
Is there a way within VS2010 Setup project to force override a .DLL even if the file versions match?
If you are willing to do msi postbuild tweaking you can hit the File table and do "version lying". Another thought is to not put that DLL in your install. Find an installer from Microsoft ( if it exists ) that you can put into a bootstrapper or create your own installer and use AMUS instead of OMUS for the version rules.
Can't you just add the file to your installer as a 'file' and install it with the other files? Don't set it as project output, or any of the canned install actions. Go to the file portion and right click the "Application Files" folder, and say > add file. Navigate to the file that you want and choose it.

Why Visual Studio creates .exe installer files?

when I build solutions in Visual Studio, that generates installer files as .exe and .msi, .exe files are useful for what?
The .EXE file that is created by the installer project is a bootstrapper for the .MSI setup file. It is used to launch the .MSI setup file.
Generally, both will launch the setup program and allow the user to install the application. However, sometimes the setup.exe file will run a custom validation routine to determine if the user's computer meets the minimum requirements for installing the software.
For example, if the user does not have Windows Installer, they will not be able to launch the .MSI file, but the .EXE application will still run and inform them that they need to install Windows Installer first. For .NET applications specifically, the .EXE file verifies the presence of the appropriate version of the .NET Framework, and if it is not present, it prompts the user to download and install it.
You can customize the prerequisites that are required for your application in your installer project using Visual Studio. See these MSDN articles for details on how to do that:
http://msdn.microsoft.com/en-us/library/ms165429(v=VS.100).aspx
http://msdn.microsoft.com/en-us/library/7eh4aaa5(v=VS.100).aspx
Others have commented on the how (.exe bootstraps the .msi) but part of the reason why is that users know that .exe files are the things you run. I don't think your average user knows that .msi files are something that you can click on to install an application.
The .exe file is made for installing the prerequisites of your application.
Let's say your application uses the .Net 3.5 framework, you can tell the installer project to include the installation of the needed libraries if they're not already installed.
You may also deactivate it, so only the .msi is being created.
This page shows how to activate and configure the prerequisites setup, just uncheck the checkbox in order to deactivate it.
You also find more details on the process of Bootstrapping on MSDN:
the capability to automatically detect
the existence of components during
installation and install a
predetermined set of prerequisites
.exe files are useful for executing your programs that you've just built in Visual Studio, assuming you're not doing web applications.
Pretty much every Windows program out there is executed using files with an .exe suffix.
Installer exe files are normally just the msi wrapped in a bootstrapper. The bootstrapper can do anything, but normally its purpose is to ensure the user is running a sufficient version of Windows Installer, then extract the msi and invoke msiexec.exe to start installing the msi. Generating installers as exe's is deprecated these days, but some still do it.

Install wizard for my windows form application - or not?

I am wondering about the need for an install wizard for my little Windows Forms application. No database access, just file access on a shared network drive.
I have seen times when an executable is sent in an email, copied to a desktop and used.
Other times when an 'install wizard' seems to be used to set up the application.
What dictates the need for this or not?
And if I want to use one - what needs to be added to my windows form app?
If your application is truly just an .exe file, it's probably okay to distribute it as-is without an installer. This might be preferable for more advanced users, because they won't have to worry about cleaning up a broken/unwanted install - they can just delete the file and be done with it.
On the other hand, most Windows users are used to working with installers, and having shortcuts automatically created on the desktop or Start->Programs. This is where an .msi can really help. Also, using an installer will usually put your application in the "Add or Remove Programs" control panel, which most people know how to use. Also, if your application is more than just a single .exe file (e.g. multiple .dlls and resource files), you'll probably want to use an .msi.
Creating an installer is easy, look at "Setup Projects" in Visual Studio.
An installer is almost always a good idea, because it can work out what dependencies your application has - which you may not even be aware of.
It also looks more professional and users will have more confidence in it.
There's an open source installer called NSIS that's pretty good, if you find the Visual Studio setup wizard too clunky, as I sometimes have.
Sometimes simply copying a file just isn't sufficient, this is when you need a setup program.
Checking if the correct version of .NET is installed
Installing C++ runtime dependencies
Creating a desktop shortcut
Setting up "default" configuration data
Adding exceptions to the Windows Firewall
Preventing installation on unsupported systems such as Windows 95/98/ME
etc, etc.
If your program is a stand-alone application with no dependencies and can run on a stock-standard install of Windows 95... then you don't need to worry about setup ;) But if your app has any external dependencies then you want to spend some time on setup.

Resources