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.
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 🙁
ReadEnvStr $0 COMSPEC
ReadINIStr $1 $INSTDIR\madman.ini "field 1" state
nsExec::ExecToLog '$0 /C $\"$INSTDIR\psychopath.exe$\" -r $\"$INSTDIR\hysteria.log$\" /$1 /$1'
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
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?
nsExec::ExecToLog '$0 /C $\"$INSTDIR\psychopath.exe$\"
Thank you for your time!