proyb2
10th November 2010 02:03 UTC
nsExec::Exec bug with specific location?
From my testing, I found something amuse with the location that only affected if I use this location, another possibility might be due to the parameter (-n 0) I've passed into the Java would caught the whole process can launch but not responding.
Meant, I tried Java without parameter, it worked! Now we have a bug.
What is the alternative solution?
C:\Users\Wildfire\Adobe Flash Builder 4\TransmissionDemo\bin-debug\java\dev.exe
!define S_NAME "dev"
Name "${S_NAME}"
OutFile "${S_NAME}.exe"
#!include FileFunc.nsh
#!insertmacro GetParameters
#Var CMD_ARGS
RequestExecutionLevel user
# Installer sections
Section -Main SEC0000
#${GetParameters} $CMD_ARGS
HideWindow
nsExec::Exec "cmd /C java -jar D:\MidiInDump.jar -n 0"
Quit
SectionEnd
proyb2
10th November 2010 07:17 UTC
Anybody?
MSG
10th November 2010 07:35 UTC
You are not at all clear about what you want to execute, but you probably need to fix your quotes. Try something like:
nsExec::Exec 'cmd /C "C:\Users\Wildfire\Adobe Flash Builder 4\TransmissionDemo\bin-debug\java\dev.exe" -jar D:\MidiInDump.jar -n 0'
proyb2
10th November 2010 07:48 UTC
huh? I think you have the code wrong. The code is referring to dev.exe
I could execute the other exe in the same location but not this, I merely change the filename but it won't work. The jar is in the same location as the exe.
MSG
10th November 2010 14:18 UTC
As I said, I don't really understand what it is you want to accomplish. I still don't.
demiller9
10th November 2010 15:43 UTC
I'm with MSG. I read the original post yesterday and couldn't understand what the code was trying to do, or what wasn't working. The rest of the posts on this thread haven't cleared up anything for me. What is the C:\users\...\dev.exe line before the code listing? What's the call to java in the code supposed to do (and apparently isn't doing)?
Does that code open up java at all? Does it need the current working directory to be set before it calls java (use SetOutPath)? You might need to expand "cmd" to its full name and path (use ExpandEnvStrings on %ComSpec%).
proyb2
10th November 2010 16:55 UTC
I am unable to launch the java runtime when place in this location except all others, it doesn't work by double click the installer too.
I sure you are familiar what is nsExec::Exec?
MSG
10th November 2010 20:38 UTC
Originally posted by proyb2
I am unable to launch the java runtime when place in this location except all others, it doesn't work by double click the installer too.
Please explain: What is "This location", you keep mentioning "this location" but I have no idea what location you're talking about.
Please explain: What are "all other (localtions)"?
Please explain: Double clicking on WHAT installer?
proyb2
11th November 2010 02:06 UTC
Failed. Nevermind. I get better answer at StackOverflow, they know it by reading code.
Animaether
11th November 2010 04:09 UTC
For what it's worth, I read your code when you first posted it - but I still don't know what the problem is, exactly, so I stayed out of this thread until now.
The single-most clear piece in your first post was this...
another possibility might be due to the parameter (-n 0) I've passed into the Java would caught the whole process can launch but not responding.
Meant, I tried Java without parameter, it worked! Now we have a bug.
So if you had no problems without the "-n 0", but are now running into problems -with- the "-n 0".. then what is that "-n 0" supposed to do? As far as I know, the arguments after the jar file specification are what are passed to the main class defined in the jar file. Which means "-n 0" is specific to your "MidiInDump.jar".. so how should we know whether it's doing what it's supposed to - we don't have that file.
And unless they can read minds at StackOverflow, I'd say good luck there..
http://stackoverflow.com/questions/4...ut-not-working
But then again.. in a second StackOverflow post...
http://stackoverflow.com/questions/4...n-regedits-run
...it seems that suddenly, everything is working just fine, despite there being no change in the code (compared to that in this thread), and the question is suddenly about some xSocket unrelated-to-NSIS stuff.
I'm sure we're all happy to help you... but neither your posts nor your code make particularly clear what the problem appears to be (and the follow-up posts really just confuse me even more). I realize that English may not be your first language - so just for kicks, describe the problem in your native language and run it through translate.google.com ; it might still make no sense to us, or it might give us another clue as to what it is you're trying to say.