Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Force Computer to Restart after Running an Installer

Primary Software: LabVIEW Development Systems>>LabVIEW Base Package
Primary Software Version: 7.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I made an installer, but how do I modify the computer restart behavior after the installation is complete on the target machine?

Solution:
Using command line arguments, you can specify whether the installer will ask the user to restart the target computer after completion. The default behavior is to ask for a restart only if it is needed by the installed components. To modify the restart behavior, add the following command line arguments to the installer setup file:

/r:f          Force a restart
/r, /r:n    Suppress a restart

One way of adding the command line arguments to the file is the following:
  1. Go to Start Menu»Run
  2. Browse to the installer setup file. Now add the appropriate command line argument from above after the quotes (e.g. "C:\setup.exe" /r:f ).
  3. Click OK.

Another way to do it is create a shortcut to the setup file and add the command line argument in the properties. For more information on command line arguments, type /? as the argument to your file (See attachment).

Related Links:
KnowledgeBase 1CNFGHFI : Using Command Line Arguments with a LabVIEW Executable
KnowledgeBase 0X1EG50Z: Passing a Command Line Argument To a Stand-Alone Executable Created in LabWindows/CVI

Attachments:
Command Line Options.png




Report Date: 06/23/2009
Last Updated: 06/26/2009
Document ID: 4YMF3OWQ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit