0

I created s small C# tool and a Installer Project for the tool, my tool uses the .net framework 4.6. The client uses the version 3.5 (Windows 7 SP1 32-bit) - everything works fine.

The Setup-Project detects the prerequisites version and start installing the dotNetFx45_Full_x86_x64.exe

But after installing the dotnetfx, the setup project doesn't start restart. Is it possible to restart the Setup.exe after installing dotnetfx?

I guess yes, maybe with the following parameters /norestart /ChainingPackage

But how do I pass this parameters to the dotnetfx.exe?

My current Setup-Folder:

/Setup.exe
/DotNetFX45/dotNetFx45_Full_x86_x64.exe
/DotNetFX45/dotNetFx45LP_Full_x86_x64de.exe

Or should I use the following Setup-Folder:

/Setup.exe
/dotNetFx45_Full_x86_x64.exe
/dotNetFx45LP_Full_x86_x64de.exe

Thanks.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
MeerArtefakt
  • 386
  • 2
  • 6
  • 26

2 Answers2

0

For your requirement, you can have a look at this: .NET Framework Deployment Guide for Developers

There are three methods to deployment the .NET Framework version on the target machine, you can directly specify the .NET Framework as a prerequisite in your app’s installation, or chain the .NET Framework setup process in your app’s setup.

When you try to chain the .NET Framework redistributable to your app’s setup, some useful command-line options are described, like /chainingpackage packageName, /norestart, /q …. You can have a test with those parameters and your setup folder structure, check it matches your idea or not.

Sara Liu - MSFT
  • 6,007
  • 1
  • 21
  • 27
  • If I start **setup.exe** the installtion from .net framework starts dotNetFx45_Full_x86_x64.exe _and_ dotNetFx45LP_Full_x86_x64de.exe are installed on my system. I can check this on the settings. My Windows 7 SP1 is a clean and empty Version (virtual machine). And after them my application setup starts. For now it is working BUT I dont know why! If I am starting the installtion from setup.msi with "some useful command-line options" ...nothing! Just a question to start the .net framework Installation, after clicking ok, it ends. No installtion, nothing. – MeerArtefakt Dec 27 '16 at 15:18
  • The right way to install a application is it to start Setup.exe or Setup.msi? – MeerArtefakt Dec 27 '16 at 15:20
  • As far as I know, both of them are the installer file, for your case, you can use the Setup.exe, since it reached your installation requirement. About the difference between this 2 files, you can have a look at this: http://stackoverflow.com/questions/1789530/what-are-the-specific-differences-between-msi-and-setup-exe-file – Sara Liu - MSFT Dec 28 '16 at 02:32
0

This might be something to do with the OS settings or anti-virus software because I believe it should restart the setup.exe after the reboot, which again goes through the prerequisite check and continues. Sometimes Windows and AV software is set to prevent auto-running after a reboot. So after the NETFx install and while the installer is asking for a reboot take a look at the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce keys (and the equivalents in HKCU) to see if there are any entries there, because that's typically the way it will try to restart after the reboot. If the entries are there, then it looks like there's something in your OS preventing the automatic restart, which is an understandable security feature.

Changing the command line to do the /norestart option requires you to open the setup.exe code file in Visual Studio (open as a file) and go into the resources setting where there is an embedded manifest containing the command line for the NET Framework - you'd alter it and save the code file. Postponing the reboot could be an issue if you have managed code custom actions in your setup because strictly speaking the framework installation is not fully installed until after its required reboot.

PhilDW
  • 20,260
  • 1
  • 18
  • 28