locked
VS2012 is ignoring /norestart switch RRS feed

  • Question

  • I'm trying to automate the installation of VS2012 on Win2008R2 but I'm have some difficulty handling the random reboots.

    The installation reboots halfway through the installation process but gives no consistent error code.  VS2010 at least acknowledged the /norestart tag and spit out error code 3015 (installation incomplete, restart required) allowing me to handling it properly within my script.  Sometimes VS2012 doesn't even give any error code and restarts the computer without the processes terminating.  Installation even resumes after the restart by itself which can be another issue.   

    Here are some of command I've been using:
    vs_ultimate.exe /q /norestart /Log C:\VS2012\Logs\VS2012.log /NoWeb /Full
    vs_ultimate.exe /passive /norestart /Log C:\VS2012\Logs\VS2012.log /NoWeb /Full
    vs_ultimate.exe /passive /norestart /Log C:\VS2012\Logs\VS2012.log /NoWeb
    vs_ultimate.exe /passive /norestart /Log C:\VS2012\Logs\VS2012.log /NoWeb /AdminFile C:\VS2012\AdminFile.xml

    I haven't tried installing a lot of the prereqs yet, only .Net 4.5.  If you think you know which prereqs are giving me these issue that might help a little bit at coming up with a work around. 

    Friday, August 31, 2012 7:07 PM

Answers

  • There are a couple things that need to happen to get a perfectly silent VS Installation on 2008R2:

    1. Install the .Net 4.5 framework separately before VS. For whatever reason if you allow the VS install to also install the 4.5 framework, a reboot is required. This is not an issue on win8/Server2012. The installer is here: http://go.microsoft.com/?linkid=9816306 and you want to pass these params: /Passive /NoRestart

    2. Edit your AdminFile to disable all optional features as well as a couple of the hidden features. Here is an example: https://github.com/mwrock/Chocolatey-Packages/blob/master/VisualStudio2012Ultimate/Tools/AdminDeployment.xml

    You can find a silent install on http://chocolatey.org. This is a windows package management system for performing unattended installs. The VS Ultimate Install is here: http://chocolatey.org/packages/VisualStudio2012Ultimate This will install the 4.5 framework and VS separately as described here.

    Hope that helps.



    • Marked as answer by Mrhasty Wednesday, October 17, 2012 8:21 PM
    • Edited by Matt Wrock Thursday, April 18, 2013 6:14 PM
    Saturday, October 6, 2012 1:09 AM

All replies

  • Hi Mrhasty,

    Please follow the steps below to run an unattended installation of VS2012:

    1). Modify the AdminDeployment.xml file which can be found in the root directory of the installation media.
    2). Run the unattended installation: <InstallMedia>\vs_ultimate.exe /adminfile <InstallMedia>\AdminDeployment.xml /quiet /norestart

    For further information about the detailed steps, see: http://msdn.microsoft.com/en-us/library/ee225237.aspx

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 3, 2012 8:31 AM
  • Setup is still rebooting without any warning using the steps you provided.
    Tuesday, September 4, 2012 6:18 PM
  • I guess I'll just add my script to run at startup, monitor the installer process and inspect the logs when it seems finished. 

    I'd still love to know how to get the VS2012 installer to respect the /norestart switch though. 

    Wednesday, September 5, 2012 7:18 PM
  • Hi Mrhasty,

    Sorry for the late response. And I did a test on my machine these days, I find that I can install VS2012 Ultimate product silently with the command: vs_ultimate.exe /silent /norestart I do not get any restarts during my installation. Please try it to see if it helps you.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Friday, September 7, 2012 5:58 AM
  • No, that does not work either and even if it did I need logging and it can't depend on the web. 

    This is 100% reproducible for me.  Installing VS2012 on Windows Server 2008 R2 requires two reboots, the first is automatic with no exit code.  The second one correctly uses the error code 0x80048bc7 and allows me to manually reboot and restart the installation. 

    Wednesday, September 19, 2012 6:17 PM
  • There are a couple things that need to happen to get a perfectly silent VS Installation on 2008R2:

    1. Install the .Net 4.5 framework separately before VS. For whatever reason if you allow the VS install to also install the 4.5 framework, a reboot is required. This is not an issue on win8/Server2012. The installer is here: http://go.microsoft.com/?linkid=9816306 and you want to pass these params: /Passive /NoRestart

    2. Edit your AdminFile to disable all optional features as well as a couple of the hidden features. Here is an example: https://github.com/mwrock/Chocolatey-Packages/blob/master/VisualStudio2012Ultimate/Tools/AdminDeployment.xml

    You can find a silent install on http://chocolatey.org. This is a windows package management system for performing unattended installs. The VS Ultimate Install is here: http://chocolatey.org/packages/VisualStudio2012Ultimate This will install the 4.5 framework and VS separately as described here.

    Hope that helps.



    • Marked as answer by Mrhasty Wednesday, October 17, 2012 8:21 PM
    • Edited by Matt Wrock Thursday, April 18, 2013 6:14 PM
    Saturday, October 6, 2012 1:09 AM
  • Hi,

    I am getting a similar problem. I need to do a complete install of VS 2012 so I cannot use the workaround suggested above. Here is the command line that I am using:

    vs_professional.exe /adminfile AdminDeployment.xml /quiet /norestart

    I install .NET 4.5 before I start the VS 2012 installer. The only change I made to the AdminDeployment.xml is this:

       <BundleCustomizations TargetDir="default" NoWeb="yes"/>

    We have region specific images for our Windows 7 desktops. The installer works on our North American image without forcing a reboot however it forces a reboot without prompting on our EMEA image whilst installing SQL CE. Here is the message from the SQL CE log:

    MSI (s) (E0:70) [18:32:09:942]: Product: Microsoft SQL Server Compact 4.0 SP1 x64 ENU. The assembly 'Microsoft.VC90.CRT,version="9.0.30729.4148",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="amd64",type="win32"' for component '{3FA0170E-227C-37C7-BAC0-64691A992C81}' is in use. You must restart to update the assembly.

    MSI (s) (E0:70) [18:32:10:911]: Product: Microsoft SQL Server Compact 4.0 SP1 x64 ENU. The assembly 'policy.9.0.Microsoft.VC90.CRT,version="9.0.30729.4148",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="amd64",type="win32-policy"' for component '{982245D9-F692-3224-BEC0-C642D74C712F}' is in use. You must restart to update the assembly.

    MSI (s) (E0:70) [18:32:11:036]: Product: Microsoft SQL Server Compact 4.0 SP1 x64 ENU -- Installation operation completed successfully.

    MSI (s) (E0:70) [18:32:11:051]: Windows Installer installed the product. Product Name: Microsoft SQL Server Compact 4.0 SP1 x64 ENU. Product Version: 4.0.8876.1. Product Language: 1033. Manufacturer: Microsoft Corporation. Installation success or error status: 0.

    MSI (s) (E0:70) [18:32:11:067]: Value of RebootAction property is
    MSI (s) (E0:70) [18:32:11:067]: Windows Installer requires a system restart. Product Name: Microsoft SQL Server Compact 4.0 SP1 x64 ENU. Product Version: 4.0.8876.1. Product Language: 1033. Manufacturer: Microsoft Corporation. Type of System Restart: 1. Reason for Restart: 1.

    What is causing Windows to ignore the /norestart option in this case? I have looked at trying to pass in some of the parameters that msiexec uses such as REBOOT=ReallySuppress [which I find to be a hilarious option] but to no avail.

    Why does the SQL CE installer ignore the /norestart and how can I fix it? I am quite sure our UK users will not enjoy a sudden reboot without any warning.

    Thanks,

    Scott

    Thursday, April 18, 2013 1:00 PM
  • Unfortunately I can't answer the question of "Why does the SQL CE installer ignore the /norestart" but I *might* have found a workaround.

    I was playing with this exact scenario last weekend and I certainly share your ferustration - I mean how much clearer can "/norestart" be? What I found is if I separately install Sql CE 4 and THEN install VS with all options ON, it does not force a reboot. You may get some 3010 exit codes since a reboot may be required to finish the installation but at least you can handle it.

    Hope that helps.

    • Proposed as answer by scott hermes Friday, May 24, 2013 8:23 PM
    Thursday, April 18, 2013 6:28 PM
  • Thanks, Matt. I will try that but my fear is that one of the other installers will hit the same error at some other point. It is a not uncommon scenario that a .DLL is in use during an install and the user has to reboot to get it updated. I just want to know that all of the installers respect the /norestart.

    ** Updated 5/24/2013 **

    It is a bug in the ssceruntime install where it does not recognize the /norestart.

    Here is the official response from Microsoft:

    "Based on our log analysis we identified the Package that’s caused reboot:
    Applying execute package: ssceruntime_x64_msi, action: Install, path: C:\ProgramData\Package Cache\E33F355F5E83D93099A732E2ECE02E07818B2696\packages\SSCE40\SSCERuntime_x64-enu.exe, arguments: '"C:\ProgramData\Package Cache\E33F355F5E83D93099A732E2ECE02E07818B2696\packages\SSCE40\SSCERuntime_x64-enu.exe" /q /i /l*v
    The error that causes the system to restart is as mentioned below:
    MSI (s) (E4:34) [10:16:48:964]: Product: Microsoft SQL Server Compact 4.0 SP1 x64 ENU. The assembly 'Microsoft.VC90.CRT,version="9.0.30729.4148",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"' for component '{9DA4DC8A-9731-3F0E-8BD5-FC17CA6848AD}' is in use. You must restart to update the assembly.
    This is VC++ 2008 dll and it shows an another process acquires a lock on this dll and not allowing it to be updated. We identified that this is a bug with SSCERuntime where it was not authored with ExitCodes to handle such scenario. Our product team is working on it and it would be considered for resolving in the next release of Visual Studio.
    At present, the work around would be to first install ssceruntime.exe then install VS2012 using the command “vs_professional.exe /adminfile AdminDeployment.xml /quiet /norestart” after excluding the SQLCE component from the AdminDeployment.xml file."

     

    Here is what a sample install for the SSCERuntime would look like:
    <installer path>\packages\SSCE40\SSCERuntime_x64-enu.exe /q /I REBOOT=R /l*v <log file>

    Thursday, April 18, 2013 8:00 PM
  • I am trying to perform silent installation of VS2012 ultimate on VDI WIn7 environment. But it goes for an automatic reboot during installation. I don't see the errors mentioned above about "Microsoft SQL Server Compact 4.0 SP1 x64 ENU" in my logs or eventvwr. But the installation stopped while running "Ultimate_Finalizer.msi" and went for a reboot and the log file is not complete even after reboot.

    I did as below

    1. Install .Net 4.5 framework separately before VS. Reboot the machine

    2. Edit the AdminFile to make NoWeb="yes" and enable all features except "VC_MFC_Libraries" as they all are required. The command used is

    "%~dp0VisualStudio2012\vs_ultimate.exe" /adminfile "%~dp0VisualStudio2012\AdminDeployment.xml" /quiet /norestart

    Below is the AdminDeployment.xml used

    <?xml version="1.0" encoding="utf-8"?>
    <AdminDeploymentCustomizations xmlns="">
       <BundleCustomizations TargetDir="default" NoWeb="yes"/>

       <SelectableItemCustomizations>
         <SelectableItemCustomization Id="WebTools" Hidden="no" Selected="yes"/>
         <SelectableItemCustomization Id="OfficeTools" Hidden="no" Selected="yes"/>
         <SelectableItemCustomization Id="SharepointTools" Hidden="no" Selected="yes"/>
         <SelectableItemCustomization Id="LightSwitch" Hidden="no" Selected="yes"/>
         <SelectableItemCustomization Id="SilverLight_Developer_Kit" Hidden="no" Selected="yes" />
         <SelectableItemCustomization Id="SQL" Hidden="no" Selected="yes" />
         <SelectableItemCustomization Id="VC_MFC_Libraries" Hidden="no" Selected="no" />
         <SelectableItemCustomization Id="Blend" Hidden="no" Selected="yes" />

         <SelectableItemCustomization Id="BlissHidden" Selected="yes" />
         <SelectableItemCustomization Id="HelpHidden" Selected="yes" />
         <SelectableItemCustomization Id="IntelliTraceUltimateHidden" Selected="yes" />
         <SelectableItemCustomization Id="LocalDBHidden" Selected="yes" />
         <SelectableItemCustomization Id="NetFX4Hidden" Selected="yes" />
         <SelectableItemCustomization Id="NetFX45Hidden" Selected="yes" />
         <SelectableItemCustomization Id="PortableDTPHidden" Selected="yes" />
         <SelectableItemCustomization Id="PreEmptiveDotfuscatorHidden" Selected="yes" />
         <SelectableItemCustomization Id="PreEmptiveAnalyticsHidden" Selected="yes" />
         <SelectableItemCustomization Id="ProfilerHidden" Selected="yes" />
         <SelectableItemCustomization Id="ReportingHidden" Selected="yes" />
         <SelectableItemCustomization Id="RIAHidden" Selected="yes" />
         <SelectableItemCustomization Id="SDKTools3Hidden" Selected="yes" />
         <SelectableItemCustomization Id="SDKTools4Hidden" Selected="yes" />
         <SelectableItemCustomization Id="Silverlight5DRTHidden" Selected="yes" />
         <SelectableItemCustomization Id="SQLCEHidden" Selected="yes" />
         <SelectableItemCustomization Id="SQLCEToolsHidden" Selected="yes" />
         <SelectableItemCustomization Id="SQLCLRTypesHidden" Selected="yes" />
         <SelectableItemCustomization Id="SQLDACHidden" Selected="yes" />
         <SelectableItemCustomization Id="SQLDbProviderHidden" Selected="yes" />
         <SelectableItemCustomization Id="SQLDOMHidden" Selected="yes" />
         <SelectableItemCustomization Id="SQLSharedManagementObjectsHidden" Selected="yes" />
         <SelectableItemCustomization Id="StoryboardingHidden" Selected="yes" />
         <SelectableItemCustomization Id="TSQLHidden" Selected="yes" />
         <SelectableItemCustomization Id="VCCompilerHidden" Selected="yes" />
         <SelectableItemCustomization Id="VCCoreHidden" Selected="yes" />
         <SelectableItemCustomization Id="VCDebugHidden" Selected="yes" />
         <SelectableItemCustomization Id="VCDesigntimeHidden" Selected="yes" />
         <SelectableItemCustomization Id="VCExtendedHidden" Selected="yes" />
         <SelectableItemCustomization Id="WCFDataServicesHidden" Selected="yes" />
         <SelectableItemCustomization Id="WinJSHidden" Selected="yes" />
         <SelectableItemCustomization Id="WinSDKHidden" Selected="yes" />
      </SelectableItemCustomizations>

    </AdminDeploymentCustomizations>

    When we tested this in VM's it worked perfectly fine without any automatic reboot but while testing in VDI we are facing this issue. Any suggestions pls? 

     

    Thursday, July 17, 2014 6:34 AM