NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Mathieu_R.

Associate tsenv tile extension with command line to launch SeqEdit with the specified Environment

Status: New

TestStand environments are really great.

 

But launching SeqEdit with a specific environment is not straighforward: launch SeqEdit, select the environment, restart... or use a specific script to manage the command line launch of SeqEdit with /env argument...

 

Why do no provide a file association in Windows when installing TestStand? Or when changing the Engine version ?

 

I'm able to associate *.tsenv files using this powershell script (requieres elevated rights plus powershell execution policy trick):

 

$extension = ".tsenv"
$classType = "NationalInstruments.TestStandEnvironment"
$commandLine = "`"%TestStandBin%/SeqEdit.exe`" /env `"%1`""

New-Item -Path "Registry::HKEY_CLASSES_ROOT/$extension" -Value "$classType" -Force | Out-Null
New-Item -Path "Registry::HKEY_CLASSES_ROOT/$classType/Shell/Open/Command" -Value $commandLine -Force | Out-Null

This way, a double click on my environment file launches SeqEdit using that specific environment file.

2 Comments
Mathieu_R.
Active Participant

Easier to test, with a simple batch file to launch as admin:

 

set "extension=.tsenv"
set "classType=NationalInstruments.TestStandEnvironment"
set "commandLine=\"%%TestStandBin%%/SeqEdit.exe\" /env \"%%1\""

reg add "HKCR\%extension%" /ve /d "%classType%" /f
reg add "HKCR\%classType%\shell\open\command" /ve /d "%commandLine%" /f
Mathieu_R.
Active Participant

Multiple versions of TestStand: the association may be updated when using the TestStand Version Selector

Multiple bitness (32/64 bits): mmm, dunno. I do not mix TestStand bitness so I don't encounter that particular case.
Still, may be addressed using registry entry to populate the Open With menu (open with SeqEdit 32 or SeqEdit 64, accordingly...)