3

I'm using a Visual Studio 2010 Deployment Project for installing my utility. It has a prerequisite of the .NET 4 Client Framework. I'm using the iexpress tool to combine my setup.exe and MSI package into a single self-extracting executable.

This is working well so far, with one small exception. My client has reported that in some instances the system is rebooting after the .NET install, and then is unable to find the MSI file and fails to continue the install. In my tests the .NET install is not requiring a reboot, but they say they have hit this bug a few times.

Is there a way I can prevent the .NET4 installer from rebooting, and instead just wait until my entire install is complete before rebooting (if required at all)? I've found several references to scripting the installer, but none of them are in the context of the VS Deployment Project.

Jason
  • 86,222
  • 15
  • 131
  • 146

1 Answers1

2

There's a documented command line switch that prevents a restart after installation; just specify /norestart when you execute the installer.

I know this exists on version 4.0, but I'm not sure about previous versions or the upcoming 4.5.

If you decide to use this, do note the caveat from the linked docs:

If you use this option, the chaining application has to capture the return code and handle rebooting (see Tracking .NET Framework 4).

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
  • thanks - but I am not including the files with my install, I am using the web installer (which I think is the default behavior for the deployment projects). Are these command line switches valid with the web installer? – Jason Jan 27 '12 at 23:54
  • @Jason: Yes, according to [this section](http://msdn.microsoft.com/en-us/library/ee942965.aspx#chaining_redistributable) of the above-linked documentation. It says that you can use either the standalone installer or the web installer, and that the command line switches are valid with either: *"Regardless of which option you choose, to chain the .NET Framework 4 installation process, run the redistributable from the command line, use the following installation command-line options after the redistributable .exe name, and process the error codes accordingly"* – Cody Gray - on strike Jan 29 '12 at 09:05
  • I haven't personally tried it, though, so I'd probably recommend testing it before deployment just to be safe! :-) – Cody Gray - on strike Jan 29 '12 at 09:06