Why does LTSpice open a new instance (window) for every .asc file I click on? - Page 1
Forum section: electronics / general

author: 741
author_rank: Frequent Contributor
timestamp: April 09, 2020, 10:49:34 am
content: It used to be that every.ascfile I opened (via Windows Explorer) opened in the same program instance of LTSpice.Now, annoyingly, a new application instance is created for each file I open in this way.Yes, I can still navigate from "within" LTSpice - but still, I'd like to be able to use Explorer on occasion.(Win7 32 bit).

author: Zero999
author_rank: Super Contributor
timestamp: April 09, 2020, 01:18:49 pm
content: When did this change?I use LTSpice under WINE and all file open in the same instance, when I load files from the desktop.

author: engrguy42
author_rank: Frequent Contributor
timestamp: April 09, 2020, 01:57:15 pm
content: Weird. I don't get that (W10). BTW, did you recently get an LTSpice update? Mine updated the other day.Hold on...You're using Windows 7??I'm telling Mom...But seriously, I wonder if that might be the issue.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 09, 2020, 02:53:54 pm
content: Win 7/64 here, latest LTSpice, and it doesn't do that. It opens files in the same instance each in a new tab.Could be something specific to the 32-bit version. I guess most of us here on Win 7 or Win 10 run 64-bit versions.(There doesn't seem to be any option for opening files in new instances or not, so don't bother trying to find this in the control panel dialog...)

author: 741
author_rank: Frequent Contributor
timestamp: April 10, 2020, 08:28:00 am
content: It always used to work normally, but has been like this now for a long time, many months. As a guess, I think some system setting is to blame rather than LTSpice itself.

author: 741
author_rank: Frequent Contributor
timestamp: September 24, 2020, 07:46:47 am
content: I re-installed Win 7, and this still happens. I would like it to work like it used to if possible.Someone else with this same problem herehttps://groups.io/g/LTspice/topic/open_multiple_asc_files_as/65786364?p=

author: exe
author_rank: Unknown
timestamp: September 24, 2020, 08:27:03 am
content: I'd love to open different files in different windows so I can simulate them independently, and also have more screen real estate. Currently, with two open files when I do simulation the screen is divided between four windows. Each window is to small for me to work efficiently.

author: Ian.M
author_rank: Super Contributor
timestamp: September 24, 2020, 09:24:17 am
content: Cant you open a second instance of the LTspice executable from the start menu, then open the second sim you want to run concurrently from within it? That works fine here (Win10 Pro x64, LTspice XVII).As to the O.P.s problem, either DDE is messed up on their PCor the LTspice.Schematic\shell\open\ddeexec subkey in their registry is borked.Here's a dump of my HKEY_CLASSES_ROOT\LTspice.Schematic key and all subkeys for comparison.Code:Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\LTspice.Schematic]@="LTspice Schematic"[HKEY_CLASSES_ROOT\LTspice.Schematic\DefaultIcon]@="C:\\Program Files\\LTC\\LTspiceXVII\\XVIIx64.exe,1"[HKEY_CLASSES_ROOT\LTspice.Schematic\shell][HKEY_CLASSES_ROOT\LTspice.Schematic\shell\open][HKEY_CLASSES_ROOT\LTspice.Schematic\shell\open\command]@="\"C:\\Program Files\\LTC\\LTspiceXVII\\XVIIx64.exe\" \"%1\""[HKEY_CLASSES_ROOT\LTspice.Schematic\shell\open\ddeexec]@="[open(\"%1\")]"For those unfamiliar with .reg file syntax and escaping, in Regedit, the LTspice.Schematic\shell\open\ddeexec entry(default)is a String Value (REG_SZ) and reads:[open("%1")]Followup:Deleting or renaming the ddeexec sub-key reproduces the O.P's observerd LTspice behaviour: a new LTspice instance is used for each schematic opened from Windows File Explorer.@exe,If you open multiple instances of LTspice, and your ddeexec sub-key is valid, File Explorer will open schematics by adding them to the instance that was most recently in-focus.

author: 741
author_rank: Frequent Contributor
timestamp: September 24, 2020, 01:01:37 pm
content: Thank you Ian. I've looked at my registry, and there are no entries at alll for LTSpice under that key. The only entries under HKEY_LOCAL_MACHINE...Uninstall.I will try adding the keys given......Failed unfortunately.I copied the text into LTSpice.reg, double clicked and importedThen I exported that key under a new name and compared with WinMerge to confirm they are identical

author: Ian.M
author_rank: Super Contributor
timestamp: September 24, 2020, 01:44:56 pm
content: Caution: I'm using 64 bit windows. If you are on 32 bit Windows the paths and exe name will be different.Also HKEY_CLASSES_ROOT is a merged view of system wide + user specific file associations. DO *NOT* attempt to manually add new keys there! (Seehttps://stackoverflow.com/questions/53984433/hkey-local-machine-software-classes-vs-hkey-classes-root)Instead its best to add the required associations with ASSOC and FTYPE in an admin command prompt to make sure the keys go where they should, and only resort to Regedit to set the DefaultIcon and ddeexec keys, searching for where they actually should be (i.e. with the keys generated by ASSOC and FTYPE rather than dumping them in HKEY_CLASSES_ROOT).If you execute the following in an admin command prompt it will do the bulk of the work for you. If you make it a .bat or .cmd file remember to double up the % characters!Code:assoc .asc=LTspice.Schematicassoc .asy=LTspice.Symbolassoc .cir=LTspice.Netlistassoc .raw=LTspice.Rawfileftype LTspice.Schematic="C:\Program Files\LTC\LTspiceXVII\XVIIx64.exe" "%1"ftype LTspice.Symbol="C:\Program Files\LTC\LTspiceXVII\XVIIx64.exe" "%1"ftype LTspice.Netlist="C:\Program Files\LTC\LTspiceXVII\XVIIx64.exe" "%1"ftype LTspice.Rawfile="C:\Program Files\LTC\LTspiceXVII\XVIIx64.exe" "%1"Here's all the significant LTspice.<whatever> entries from my HKEY_CLASSES_ROOT so you can check them off as you fix them.Code:Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\LTspice.Netlist]@="LTspice Netlist"[HKEY_CLASSES_ROOT\LTspice.Netlist\DefaultIcon]@="C:\\Program Files\\LTC\\LTspiceXVII\\XVIIx64.exe,2"[HKEY_CLASSES_ROOT\LTspice.Netlist\shell][HKEY_CLASSES_ROOT\LTspice.Netlist\shell\open][HKEY_CLASSES_ROOT\LTspice.Netlist\shell\open\command]@="\"C:\\Program Files\\LTC\\LTspiceXVII\\XVIIx64.exe\" \"%1\""[HKEY_CLASSES_ROOT\LTspice.Netlist\shell\open\ddeexec]@="[open(\"%1\")]"[HKEY_CLASSES_ROOT\LTspice.Rawfile]@="LTspice Rawfile"[HKEY_CLASSES_ROOT\LTspice.Rawfile\DefaultIcon]@="C:\\Program Files\\LTC\\LTspiceXVII\\XVIIx64.exe,3"[HKEY_CLASSES_ROOT\LTspice.Rawfile\shell][HKEY_CLASSES_ROOT\LTspice.Rawfile\shell\open][HKEY_CLASSES_ROOT\LTspice.Rawfile\shell\open\command]@="\"C:\\Program Files\\LTC\\LTspiceXVII\\XVIIx64.exe\" \"%1\""[HKEY_CLASSES_ROOT\LTspice.Rawfile\shell\open\ddeexec]@="[open(\"%1\")]"[HKEY_CLASSES_ROOT\LTspice.Schematic]@="LTspice Schematic"[HKEY_CLASSES_ROOT\LTspice.Schematic\DefaultIcon]@="C:\\Program Files\\LTC\\LTspiceXVII\\XVIIx64.exe,1"[HKEY_CLASSES_ROOT\LTspice.Schematic\shell][HKEY_CLASSES_ROOT\LTspice.Schematic\shell\open][HKEY_CLASSES_ROOT\LTspice.Schematic\shell\open\command]@="\"C:\\Program Files\\LTC\\LTspiceXVII\\XVIIx64.exe\" \"%1\""[HKEY_CLASSES_ROOT\LTspice.Schematic\shell\open\ddeexec]@="[open(\"%1\")]"[HKEY_CLASSES_ROOT\LTspice.Symbol]@="LTspice Symbol"[HKEY_CLASSES_ROOT\LTspice.Symbol\DefaultIcon]@="C:\\Program Files\\LTC\\LTspiceXVII\\XVIIx64.exe,11"[HKEY_CLASSES_ROOT\LTspice.Symbol\shell][HKEY_CLASSES_ROOT\LTspice.Symbol\shell\open][HKEY_CLASSES_ROOT\LTspice.Symbol\shell\open\command]@="\"C:\\Program Files\\LTC\\LTspiceXVII\\XVIIx64.exe\" \"%1\""[HKEY_CLASSES_ROOT\LTspice.Symbol\shell\open\ddeexec]@="[open(\"%1\")]"

author: 741
author_rank: Frequent Contributor
timestamp: September 24, 2020, 03:40:58 pm
content: OK Thanks again.I am using Win7 64 bit. I removed the regedit key I'd manually added. Then I ran a cmd file, which resulted in the enties shown in the image.I exported the netlist key, and got thisWindows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\LTspice.Netlist][HKEY_CLASSES_ROOT\LTspice.Netlist\Shell][HKEY_CLASSES_ROOT\LTspice.Netlist\Shell\Open][HKEY_CLASSES_ROOT\LTspice.Netlist\Shell\Open\Command]@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\00,46,00,69,00,6c,00,65,00,73,00,5c,00,4c,00,54,00,43,00,5c,00,4c,00,54,00,\73,00,70,00,69,00,63,00,65,00,58,00,56,00,49,00,49,00,5c,00,58,00,56,00,49,\00,49,00,78,00,36,00,34,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,00,25,00,\31,00,22,00,00,00That final hex entry looks OK in regedit i.e."C:\Program Files\LTC\LTspiceXVII\XVIIx64.exe" "%1"But several bits like the key[HKEY_CLASSES_ROOT\LTspice.Netlist\shell\open\ddeexec]are absent, so I can try adding those bits manually

author: Unknown
author_rank: Unknown
timestamp: September 24, 2020, 03:51:53 pm
content: Do you have a basic knowledge of running Sysinternal Process Monitor? If so, can you run that, then run LTSpice and filter out only its .exe let it run and let it open a new instance, window, stop the trace then upload it somewhere like WeTransfer and then give us all the link so we can take a look. Something in the trace might show why its opening another instance. Maybe some permission denied which is forcing it to open a new instance.

author: Ian.M
author_rank: Super Contributor
timestamp: September 24, 2020, 04:36:17 pm
content: The hex stuff is because FTYPE creates values of REG_EXPAND_SZ type rather than REG_SZ that *most* program installers create. They work much the same (unless you are writing code to handle them) except expansion of environment variables in REG_EXPAND_SZ strings are deferred till they are used.If you are feeling brave, (and have created a system restore point), you could replace[HKEY_CLASSES_ROOT\with[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\in the registry snippet I posted, save it as a .reg file and Merge it. That will put in the same registry entries for the LTspice named file associations as I've got on this Win 10 Pro x64 PC.@ any latecomers: The advice above was for the specific English language Windows 7 64 bit the O.P's running version. YMMV, and expect borkage if you are running non-English, or 32 bit windows or LTspice was installed elsewhere. Windows 10 borks system restore points so don't expect that to save you!*YOU* *HAVE* *BEEN* *WARNED*

author: 741
author_rank: Frequent Contributor
timestamp: September 25, 2020, 08:03:17 am
content: WeTransfer looks like a useful site, here's the link to the LT monitorhttps://we.tl/t-MnTScaBSlM

author: 741
author_rank: Frequent Contributor
timestamp: October 08, 2020, 08:18:09 am
content: First I un-installed, then I installed the latest vesion, no change.Then I updated the posted reg file (using the HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ substitution) and the import worked.Finally I tried agin, and still the same issue whereby every .asc I click on launches a new window.I also tried removing the old HKEY_CLASSES_ROOT\LTspice.Netlist entries, but that made no difference.

author: Ian.M
author_rank: Super Contributor
timestamp: October 08, 2020, 12:22:22 pm
content: Sorry to hear that. Are you experiencing any issues with DDE and any other programs?

author: Unknown
author_rank: Unknown
timestamp: October 08, 2020, 08:59:46 pm
content: Strange. Installed on Windows 10 and I get same issue, installed on Windows 7 64bit and it doesn't do it.Time to check the Process Monitor logs on both.

author: Unknown
author_rank: Unknown
timestamp: October 08, 2020, 09:15:21 pm
content: One way round it at moment which is annoying is when the window is small, dragging the .asc into the LTSpice window which then keeps it in the same running process.