Deploying .NET Framework 4.5 with Installshield - entity-framework

I have written an application that I deploy via Clickonce, but I want to deploy it via Installshield, so I am experimenting with it. I found and downloaded dotnetfx45_full_x86_x64.exe, the redistributable for .NET Framework 4.5, and made a Installshield prerequisite from it. I wrote a simple application that has a RDLC report that just says “Hello World”, and it needs .NET Framework 4.5, and used Installshield to deploy it. The Reportviewer needs Microsoft SQLClrTypes_x86.msi and SQLClrTypes_x64.msi, and ReportViewer.msi, so I got those and made Installshield prerequisites from them. For the ReportViewer.prq, I specified SQLClrTypes_x86.prq and SQLClrTypes_x64.prq, as dependencies, and for SQLClrTypes_x86.prq and SQLClrTypes_x64.prq I specified dotnetfx45_full_x86_x64.prq as a dependency.
When I installed my little application on my test computer (running Windows 7), it installed the 4.5 framework, said it needed to reboot, and asked if I wanted to reboot now, and I clicked Yes. I was thinking it would reboot and continue the installation, but when it rebooted, that was the end of the installation. I ran setup again, it asked if I wanted to install the 4.5 Framework (it asked me the first time, too), so I clicked No. After clicking No, it installed the rest of my program, and it ran perfectly.
How can I get the installation to continue after it reboots from installing the .NET Framework 4.5?
Thanks

Here's a blog I wrote about 9 years ago:
Using InstallShield 12 to Install .NET Framework 3.0
It hasn't changed much. You want to use the prereq editor to change the reboot behavior to Note it, fail to resume if the machine is rebooted, and reboot after the installation.
Also please note that InstallShield consumes it's PRQ files from the ISProductFolder (C:\Program Files (x86)\InstallShield.... ) I don't care for this from a CM perspective. I recommend isolating the file and file references to relative paths based on ISProjectFolder and keeping all of these files in your source control tool.
Behavior Tab

Related

InstallShield Run setup and install prerequisites without asking

I have a WinForm Application done in Visual Studio 2012, Framework 4.5. I made the Setup Project with InstallShield. I need to install this App on PC that may not have Framework 4.5 installed, so I add Framework 4.5 as a PreRequisite. So far So good.
What I want is to Install the PreRequisite automatically, without asking my clients when they Runs the Setup.
Is that Possible?
Thanks
Edit your PRQ to always install .net45 with no input. Here is a .net40 PRQ we use locally.
/passive has it show a progress bar, but you could just as easily do /q (no UI at all). The only problem would be a very long startup delay to your install which the user would probably interpret as "something is wrong" so I'd recommend keeping /passive.
InstallShield doesn't support this feature. The closest is to make the prerequisite mandatory. Another possibility would be to associate the PRQ to a feature to make it a "feature prereq" instead of a "setup prereq". This would cause Setup.exe to go right into your MSI and then defer the installation until after user interview.

C# application .Net 2.0 Couldn't run in Windows XP

I built a .Net 2.0 Application for Windows XP but I made it in Windows 7.
The application contains a Mysql.data connection and CrystalReport. When I try to run it on Windows XP, the application does not run, giving an error message of:
The application failed to initialize properly (0xc000007b).
I tried to rebuild application in Windows XP, but when I rebuilt and ran it in Visual Studio, the following error occurs:
Could not load file or assembly or one of its dependencies. The module was expected to contain an assembly manifest.
How can I fix this?
Please try the following:
1.Uninstall the .NET Framework 3.5 from Add/Remove Programs (in the Control Panel) on Windows XP or Programs and Features on Windows Vista/Windows 7.
Even if the uninstall fails, go on to step 2.
2.After the Framework 3.5 has been uninstalled or if it failed, download and run the .NET Framework removal tool.
Here's the link to Aaron Stebner's Framework Removal tool on Windows Live Skydrive:
http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog_Tools/dotnetfx_cleanup_tool.zip?wa=wsignin1.0&sa=17797669
Aaron Stebner is a Microsoft employee. The tool he's developed is linked on that page and makes easy work of cleaning up damaged .NET Frameworks from your system so they can be reinstalled. When you run the tool, choose the .NET Framework 3.5 from the list and choose to cleanup. After this is done, reinstall the .NET Framework 3.5 that Design 3 needs by running the Expression Design 3 setup package again. It will detect that the .NET Framework 3.5 is missing and reinstall it for you. After that's done, try running Design 3 again.
3.If that still fails to resolve the problem, go to START, RUN and type CMD to run a command prompt. Type CHKDSK /R and hit ENTER. Hit the letter Y and restart the machine. Allow the machine to do the check disk scan. After this is done and it goes back into Windows, try Expression Design again.
more information here

Lightswitch Desktop Application Wont Run in XP SP3

I have developed an application in Lightswitch 2012, and now need to deploy it to a desktop PC running XP SP3.
I have already looked at two previous posts Can't run Lightswitch 2012 Programm under Windows XP and
Lightswitch Desktop Application Wont Install in XP SP3
The two posts both refer to executing [editbin vslshost.exe /SUBSYSTEM:WINDOWS,5.01 /OSVERSION:5.1] to modify the vslshost.exe file, though only the first post says it worked.
In my case, I have tried the above to update the vslshost.exe file, but when I publish my LS2012 project it reverts back to the default vslshost.exe file. And if I manually swap the file with the copy I modified, when I run the deployed app I get the following error:
System.Deployment.Application.InvalidDeploymentException (HashValidation)
- File, vslshost.exe, has a different computed hash than specified in manifest.
- Source: System.Deployment
So, the questions are
am I doing something wrong?
is there a master copy of vslshost.exe I need to update instead?
(BTW, I also ran the VS2012 (KB270250 from VS2012 Update 1 CTP 4))
Thanks for your help
As this is an internal company app, I have just convinced our IT guy to upgrade the machine, because the certain grief of trying the different possible solutions was just too much.
BUT if you MUST deploy to XP
To find out more, here are two pretty exhaustive posts with input directly from the Lightswitch team:
Progress on LS2012 desktop apps installing AND running on XP yet?
Windows XP 32 bit deployment
Enjoy....(???)

Make .NET Framework 4 wpf application portable or more reliable to install

I am required to create a simple application. Since I am good at WPF and I don't know win forms that good I implemented my application by creating a .Net Framework 4.0 WPF project in Visual Studio. Everything works great the application runs like it is supposed to.
Since the application is required to run in multiple platforms (Windows XP and above) I am including the prerequisites when publishing my applications. The prerequisites happen to be:
1) WIC (Windows Imaging Component) old computers need that to run the .net framework 4.0
2) Windows installer 3.1 (needed in order to install the next prerequisite)
3) Windows .NET Framework 4.0 Client Profile
If I install those prerequisites then the application runs like it is supposed to.
Now the problem is:
My boss did not approve my application because he tried installing it in a Windows XP machine with SP2 and this are the things that happened:
Step 1)
// first prerequisite (WIC) took less than 1 minute to install everything
// is working great so far.
Step 2)
// second prerequisite (Windows Installer 3.1) takes about 2 minutes to install
// which is great. After the installation is done the computer needs to be
// restarted in order to continue with the installation. Things are not going
// that good now but we are still ok...
Step 3)
// After the computer is done rebooting it continues with the last prerequisite
// (Windows .NET Framework 4.0 Client Profile). That takes 10 minutes to install!!!!
Step 4)
// My application has all the prerequisites needed to be installed so it installs in
// about 1 minute
We recorded the time, and the application took about 25 minutes to install from start to finish. The computer where we tested the installation was a virtual computer using 2 cores and 1 GB of memory with 3.1 GHZ.
What do you guys recommend in order to speed up this installation? Should I use a different technology such as windows forms using .net 2.0? It will be nice if I can deploy the application that I have already created. If you guys could help me make this application portable I will really appreciate it. In order to do so I tried building my application with all the required references copied to the output directory. That did not work... Or any ideas of how to make the installation be faster will be of great help as well.
If you're using .NET Framework 4.0 (which is not going to come out-of-the-box with any versions of Windows, especially Windows XP) there's no way to get around the install of .NET 4.0 on the target machine. Your major bottleneck is going to be the download of .NET 4.0 files from Microsoft to the machine.
I've run into similar problems where the initial install of an application takes forever because of the .NET 4.0 download and install. We even encountered an issue where the application couldn't be install because there was insufficient disk space for the download.
One option would be to pre-push the prereqs out to all the machines you'll be install this on before deploying your application.
Otherwise, you might be forced to use an older version of the .NET framework. Here's a list of the framework versions which shipped with various versions of windows.
http://blogs.msdn.com/b/astebner/archive/2007/03/14/mailbag-what-version-of-the-net-framework-is-included-in-what-version-of-the-os.aspx
Unfortunately, if your organization is committed to using a 10 year old operating system then they either need to accept that modern tools will require a lengthy install process while all prereqs are loaded... or else force you to use a 10 year old software technolgy.

How do I make a custom .net client profile installer?

For .net 3.5 SP1, Microsoft have the new client profile which installs only a subset of .net 3.5 SP1 on to Windows XP user's machines.
I'm aware of how to make my assemblies client-profile ready. And I've read the articles on how to implement an installer for ClickOnce or MSI.
But I've been using Inno Setup for my project so far and I'd like to continue to use it (as an Express user, I can't easily make MSIs), I need to know how to use the client-profile installer in a custom environment.
There is an article on a Deployment.xml schema, but no indication of how to write one, package it or anything else. Can someone explain this process? Finding the articles I linked to alone was a painful search experience.
Microsoft has now shipped the Client Profile Configuration Designer (Beta).
This designer lets you edit the XML files with some limitations, this isn't a 'Google beta' by any means.
Information and download
Can you clarify: Are you trying to write an installer for your app, which depends on the Client-Profile, or are you trying to write a custom installer for the client-profile?
I haven't used it personally, but if it's anything like the dotnetfx 1 and 2 msi's, you basically have to just invoke it's executable yourself from your own .exe file, or from an Msi BEFORE the InstallExecuteSequence starts up - you can't "embed" those in your own app, MS go out of their way to tell you not to do that due to suckage of MSI.
Client profile works only on clean XP. If your user as .Net 1 or 2 installed, client profile wont install...
You have an offline version (integrating Full .Net3.5 Install in case Client Wont install) 200 to 300Mo don't remember
Online version will get required files.
You can call a silent install from the first steps of your install.