Home  /  Resources & support  /  FAQs  /  Installing Stata 16 from the Windows command line

How can I install Stata 16 from the command line without GUI under Windows?

Title   Installing Stata 16 from the Windows command line
Author Hua Peng, StataCorp

  1. Stata 16 is for 64-bit Windows only. It does not install on 32-bit Windows.
  2. Stata 16 requires a minimum Windows OS level of Windows 7. See a list of supported Windows OS.
  3. The Stata 16 installer requires the user who performs the install to have administrator privileges on the system.
  4. To install Stata from the command line without GUI, launch the Windows Command Prompt as Administrator.
  5. You may launch the Windows Command Prompt as Administrator by pressing Windows+R to open the “Run” box. Type cmd into the box and then press Ctrl+Shift+Enter to run the command as an administrator.
  6. To run SetupStata16.exe, use the /s option. You also need to use /v"/qn" to pass /qn to suppress the enclosed MSI script's GUI.
  7. To add features, use ADDLOCAL. There is one required feature:
    core Required Stata files and dlls
    The following features need to be installed based on your license:
    StataMP6464-bit Stata/MP
    StataSE6464-bit Stata/SE
    StataIC6464-bit Stata/IC
  8. The following properties can be used to control the behavior of the installation:
    USEPERSONALDIRDefault to 1
    INSTALLDIR1Default to “C:\data”
    ALLUSERSDefault to 1
    USERNAMEDefault to current user
  9. To pass the properties to the enclosed MSI script, use syntax /v"PROPERTY=value"
  10. Examples (drive E: is arbitrary and represents the DVD drive or the drive that contains the downloaded installer)
    To install 64-bit Stata/MP for all users:
           E:\SetupStata16.exe /s /v"/qn ADDLOCAL=core,StataMP64"
    To install 64-bit Stata/IC for all users, and using the "C:\data" folder as the default working directory:
           E:\SetupStata16.exe /s /v"/qn ADDLOCAL=core,StataIC64 USEPERSONALDIR=0"
    To perform a silent uninstall from command line:
           E:\SetupStata16.exe /s /x /v"/qn"
  11. Important notes:
    • Both /s and /v are lower case.
    • Features for ADDLOCAL are case sensitive, "core" is correct and "Core" is incorrect.
    • There must be no space between /v and the following double quote.
  12. How to extract Stata 16.msi from SetupStata16.exe:
  13. Method 1

    1. Create the folder stata16_install in the C: drive.
    2. Launch cmd.exe as an Administrator.
    3. Use cd to move into the folder where SetupStata16.exe is located.
    4. Type

    	SetupStata16.exe /s /x /b"C:\stata16_install" /v"/qn"
    5. Stata 16.msi will be in C:\stata16_install\.

    Method 2

    1. Run SetupStata16.exe once it is on a Windows machine.
    2. Search for Stata 16.msi; it is usually in the following location:

       	C:\Users\YOURUSERNAME\AppData\Local\Downloaded Installations\{682DAB62-6978-4241-BAA3-EE94996DF4B4}

    How can I install Stata 15 from the command line without GUI under Windows?