Page 1 of 2

NRN 7.4 on windows 10

Posted: Thu Aug 25, 2016 12:00 am
by asb
Hi Ted,

I have been experiencing a problem with NRN 7.4 on my laptop with windows 10. I couldn't find a similar issue posted elsewhere (although I suspect I'm making a silly error...).

The command window and GUI work perfectly if I open nrngui directly, ie double clicking from file explorer. However if I try to load via the file init.hoc (containing: load_file("nrngui.hoc") ) I get the error "Cannot WinExec c:\nrn ...... "). Unit checking and model compilation on the other hand work fine.

Version 7.3 cygwin works perfectly and I have been using this instead.

Any help would be much appreciated!

Thanks

Re: NRN 7.4 on windows 10

Posted: Thu Aug 25, 2016 9:45 am
by ted
What is the complete error message?
Where is NEURON's installation directory? Root of the C: drive or somewhere else?

Re: NRN 7.4 on windows 10

Posted: Thu Aug 25, 2016 8:43 pm
by asb
Hi Ted

The complete message is:

"Cannot WinExec c:\nrn\mingw\bin\bash.exe -i/c/nrn/lib/neuron3.sh /c/nrn
nrngui C:/Users/brysona/Desktop/init.hoc"

The installation directory is in the root of the C: drive.

Thanks in advance

Re: NRN 7.4 on windows 10

Posted: Sun Aug 28, 2016 5:43 pm
by hines
I would like for you to uninstall your 7.4 version and try
http://neuron.yale.edu/ftp/neuron/versi ... -setup.exe
to see if that fixes your problem.

Re: NRN 7.4 on windows 10

Posted: Mon Aug 29, 2016 4:14 am
by asb
Thanks for your reply, but unfortunately I keep having the same issue with the 7.5 version (the error message is identical..)

Re: NRN 7.4 on windows 10

Posted: Mon Aug 29, 2016 10:36 am
by hines
What happens with you double click on the nrngui icon and in the resulting terminal window, type
WinExec("ls")
do you get a directory listing?

Are you getting the error when you double click on a hoc file?

Re: NRN 7.4 on windows 10

Posted: Mon Aug 29, 2016 9:20 pm
by asb
What happens with you double click on the nrngui icon and in the resulting terminal window, type
WinExec("ls")
do you get a directory listing?
Yes, I get the directory listing
Are you getting the error when you double click on a hoc file?
Yes, I get the error message when I double click on a hoc file which seems to happen regardless of the directory the hoc file is located in. When I have v7.3 cygwin installed there are no issues launching hoc files for some reason.

Re: NRN 7.4 on windows 10

Posted: Tue Aug 30, 2016 4:20 pm
by hines
Do the hoc files you double click on, have a blue icon with an action potential trajectory?
If not, the following may be helpful. If so, I'm still puzzled by the behavior.
Right click on the demo.hoc file and select 'Properties'
In the 'Opens with: field, press the "Change" button.
Browse to c:\nrn\bin\neuron.exe and select that. and then press OK.
Press OK for the original 'demo Properties' panel.
Double click the demo.hoc file. Does it work?

I believe the process of double clicking on the file is supposed to move to that folder
and then, from there, execute the neuron.exe, with demo.hoc as the argument.

There was a major change to the setup.exe installer builder in March 2015
http://www.neuron.yale.edu/hg/neuron/nr ... d13e04585f
in which most registry entries changed from the top level of HKCU to underneath
HKCU's Software\Classes\
It was this kind of change that made the icons associated with the hoc files to appear
and double clicking a hoc file start to work.

Re: NRN 7.4 on windows 10

Posted: Tue Aug 30, 2016 7:48 pm
by asb
Yep, the blue icon with the AP appears.
I followed those steps again just in case, but unfortunately the same message keeps appearing.

Re: NRN 7.4 on windows 10

Posted: Wed Aug 31, 2016 4:37 pm
by hines
This is a real puzzle and i'm stirring the bottom of the barrel for ideas about how to diagnose the problem. Try the following
Start a dos command line window and see if the bash shell works. ie type

Code: Select all

c:\nrn\mingw\bin\bash.exe
If you get the bash prompt then good. hit ^D to get back to dos. then

Code: Select all

c:\nrn\mingw\bin\bash.exe -i /c/nrn/lib/neuron3.sh /c/nrn nrngui
if you get a NEURONMainMenu then good. hit ^D again to get back to dos.
note the above does not work if there is no space after the -i
I presume there was a typo in your transciption of the message in your earlier post.
Lastly, type the entire line and see if the hoc file load and executes
By the way, I'm not able to reproduce your error on my windows 10 virtual box guest

Re: NRN 7.4 on windows 10

Posted: Thu Sep 01, 2016 6:04 pm
by asb
This is a real puzzle and i'm stirring the bottom of the barrel for ideas about how to diagnose the problem. Try the following
Start a dos command line window and see if the bash shell works. ie type
Code: Select all
c:\nrn\mingw\bin\bash.exe
If you get the bash prompt then good. hit ^D to get back to dos. then
Code: Select all
c:\nrn\mingw\bin\bash.exe -i /c/nrn/lib/neuron3.sh /c/nrn nrngui
if you get a NEURONMainMenu then good. hit ^D again to get back to dos.
This all works perfectly when I use powershell.
note the above does not work if there is no space after the -i
I presume there was a typo in your transciption of the message in your earlier post
Yes - there was a typo in my previous post
Lastly, type the entire line and see if the hoc file load and executes
By the way, I'm not able to reproduce your error on my windows 10 virtual box guest
Do you mean, replace load_file("nrngui.hoc") with load_file("c:\nrn\mingw\bin\bash.exe -i /c/nrn/lib/neuron3.sh /c/nrn nrngui")?
I tried this, but once again the same error message above appears.

Re: NRN 7.4 on windows 10

Posted: Thu Sep 01, 2016 7:47 pm
by hines
The only other thing I would suggest is to uninstall your present version of NEURON. Verify there is no neuron.exe on the machine and edit the registry
to remove all mention of NEURON related variables. then re-install the alpha version I suggested above.

Re: NRN 7.4 on windows 10

Posted: Fri Sep 02, 2016 10:49 pm
by asb
I searched through the machine and also removed all mention of neuron in the registry, but still no luck.

It looks like I'm consigned to using the 7.3 version...... thanks for your help anyway, and if I stumble across the problem I'll post the solution

Re: NRN 7.4 on windows 10

Posted: Sat Sep 03, 2016 7:49 am
by hines
The only function of neuron.exe is to execute the string
sprintf(buf, "%s\\mingw\\bin\\bash.exe -i %s/lib/neuron3.sh %s nrngui %s", nrnhome, nh, nh, args);
err = WinExec(buf, SW_SHOW);
where args is the name of the file you double click on.

Re: NRN 7.4 on windows 10

Posted: Sat Sep 03, 2016 7:54 am
by hines
I been assuming that you cannot successfully double click on any hoc file Is that the case with
c:/nrn/demo/demo.hoc ?