Cannot Open TestStand After Changing the TestStand Configuration Directory

Updated May 8, 2023

Reported In


  • TestStand 2016 SP1
  • TestStand 2016
  • TestStand 2014 SP1

Issue Details

I modified the TestStand Configuration Directory from the following option:
Configure >> Station Options >> Preferences >> Configuration Directory
and now TestStand Sequence Editor won't open anymore.
I obtain the following error:

Access Denied
Error writing to file '...\StartupCfg.ini'.​


I can also get one of the following errors:

Error writing to file '...\GeneralEngine.cfg'. 
Unable to save the changes to the TestStand Configuration. 

The TestStand Engine cannot be initialized.
Unable to open file '...\GeneralEngine.cfg'.

Creating an instance of the COM component with CLSID... failed due to the following error: 80004005 Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)).

How can I fix this and launch TestStand correctly?


This is usually caused by a permissions error associated with the configuration directory you selected.
You can follow three different methods to try to solve the problem.

Method 1:
In some cases, you can fix this by running TestStand with elevated permissions (i.e., run TestStand as administrator) and then changing the Configuration Directory back to <TestStand Default Directory>.
To do this, you have to:
  1. right-click on any shortcut to TestStand or SeqEdit.exe and select Run As Administrator. TestStand should now open normally.
  2. navigate to Configure >> Station Options >> Preferences and change the Configuration Directory to <TestStand Default Directory> using the drop-down menu. Select OK. Select No to prevent making copies of your configuration files
  3. exit TestStand.
You should now be able to open TestStand without seeing the errors mentioned above.

Method 2:
You can also resolve this by manually copying the contents of the TestStand Cfg folder into the new configuration directory. To achieve this:
  1. locate the Cfg folder, that installs by default into C:\ProgramData\National Instruments\TestStand 2016 (XX-bit)\Cfg
  2. copy all of the contents of the Cfg folder
  3. paste into the new Configuration Directory TestStand is looking to. You may need Administrator privileges to complete this step.
After copying the files, you should be able to open up TestStand and change the Configuration Directory back to the default location as explained in Method 1.

Method 3:
This method involves modifying the Registry Key mentioned in the error screenshot above.
You need to follow these steps:
  1. Go to Start>>Run... and enter regedit.exe into the command line.
  2. Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\TestStand\<version>
  3. Double-click the CfgLocation registry key, and change the file path in the Value data box of the Edit String window.
  4. Select OK and close out of the Registry Editor.
You should now be able to open up TestStand normally.

Additional Information

WARNING: Inappropriate changes to the Windows Registry can disable your operating system. To safeguard against such an event, you should backup your existing Registry by choosing File >> Export after launching the Registry Editor and before making any changes. 

Removing information from the Windows Registry can negatively impact the performance of your computer if not done correctly. National Instruments cannot assume any responsibility for problems arising from changes to the Windows Registry.