- Revenera Community
- InstallShield Forum
- Re: Install .NET Framework 4.7.2
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Printer Friendly Page
Install .NET Framework 4.7.2
Hello, I use Installshield 2012 Spring Premier Edition . I included .NET Framework 4.7.2 offline installer package.
The Values in the Prerequisite Editor are.
For the alternate location to download = http://saturn.installshield.com/is/prerequisites/Microsoft .NET Framework 4.7.2 Full.prq
The registry key = local machine ...
Value name = release
Value data = 461808
Run if = System less than value data
File to Include
I added the .net framework file
Application to Run
Launch the NDP472-KB4054530-x86-x64-AllOS-ENU.exe
Command for the application = /q /norestart
Command for the application in silent mode = /q /norestart
Return code = 1641,3010
Checked administrative privilegs
After installing the prerequistie = Ask whether to continue the setup
Need a reboot = Exit and resume on reboot
When I run the setup it installs the .net framwork and a message appears that it needs a restart. Want to restart now or later is the output. This is so right. Now comes my problem. If I say later, then the setup does not continue. It closes the window with the message and nothing happens anymore.
What do I have to adjust to continue the setup? When I restart, it runs the setup again, but I don't want to restart the computer.
Can anybody help me please?
(This works in projects that use MSI as the installation engine, I don't know enough about pure Installscript projects to help you there)
Honestly, I find the prequisite Installer too complicated to use it for installing .NET packages and I kept running in the same problems. It also doesn't make sense to me to install additional packages before your Setup (except when your Custom Actions need .NET themselves). I rather run the required package AFTER I'm sure my own installation had run successfully.
This is what I do:
- Get the online or offline .NET Installer you need from https://docs.microsoft.com/en-us/dotnet/framework/deployment/deployment-guide-for-developers#redistributable-packages and store it in a persistent location
- Add a System Search for the Registry Key like https://docs.microsoft.com/en-us/dotnet/framework/deployment/deployment-guide-for-developers#detecting-the-net-framework and save the result in a Property, eg PROP_DOTNET_INSTALLED_VERSION. Also make note of the DWORD Version of .Net Framework you require (In your case, 4.7.2 -> 461808)
- Add a new Custom Action EXE->Stored in Binary Table and add the Exe file you just downloaded
- Add the following string to the "Command Line"-Option in your Custom Action : "/passive /norestart /showrmui /LCID [ProductLanguage]" (no quotes)
- This will show a passive progress dialog of the .Net installation. Use "/q /norestart /showrmui" (no quotes) instead if you don't want to show anything to the user
- Run the CustomAction after "InstallFinalize" and execute it when the .Net Version from the Registry Key is lower than the one you require (in your case this would be: NOT REMOVE~="ALL" AND NOT PROP_DOTNET_INSTALLED_VERSION >= 461808)
Depending on your setup design, you can(should?) add a Checkbox in your dialogue so the user can decide if he wants to install missing .NET during the setup or all by himself afterwards.