How do you ReadINIStr & nsExec::ExecToLog one line with a few parameters?
I've tried doing the following which should really be easy but which is proving to be so frustrating. I've tried so many combinations of the following, it got me sick :(
I am trying to read an ini value then feed it into a cmd fired by nsExec::ExecToLog. I've tried so many different combinations, I am tired :( The pasted code below is what I feel should be dead on the money.
ReadEnvStr $0 COMSPEC
ReadINIStr $1 $INSTDIR\madman.ini "field 1" state
nsExec::ExecToLog '$0 /C $\"$INSTDIR\psychopath.exe$\" -r $\"$INSTDIR\hysteria.log$\" /$1 /$1'
When I say I've tried so many things I mean it. Look at the above code... I've tried without exaggeration maybe forty or more different combinations. I finally got tired :(I just don't see whats going wrong... *sigh*. I'll try to remember a long list of errors and make this quick. Either (A) NSIS wont read it upon install OR (B) It will log the DOS splash screen (MS COPYRIGHT,etc) and nothing else OR (C) It will tell me C:\Program is not a program, etc OR (D) I can only get the first of the code to work
nsExec::ExecToLog '$0 /C $\"$INSTDIR\psychopath.exe$\"
The entire line of code above (-minus NSIS format) direct into the cmdline works perfect without hiccup. Yet I must be getting the format horribly wrong. Can someone please help shine some light on my problem?
Thank you for your time!