How can I get this to run properly?
I am am trying to run a executable from my installer script. It is a command-line program (ConvertApp.exe) that takes two directories as parameters. It is meant to read a specific file named "AutoComplete.stm" (first param) and convert it's various contents into files in a directory (second param) in the $INSTDIR . The problem is that I cannot use any variables like $INSTDIR, $PROGRAMFILES, or $DESKTOP in the directory paths. When I try to using something like:
nsexec:Exec '"C:\ConvertApp.exe" "C:\Program Files\LiveEditor\AutoComplete.stm" "$INSTDIR\AutoComplete"'
it doesn't work. Now, I am able to copy the ConvertApp.exe into C:\ and run it from there, and the AutoComplete.stm file will always be found at "C:\Program Files\LiveEditor\AutoComplete.stm" (I am running the converter only if it is detected). However, the user needs to be able to change the install directory, and therefore I need to indicate that when calling the converter program.Doing it like this works:
nsexec:Exec '"C:\ConvertApp.exe" "C:\Program Files\LiveEditor\AutoComplete.stm" "C:\AutoComplete"'
and I figured I could just copy over the contents of C:\AutoComplete to $INSTDIR\AutoComplete afterward. That didn't work though. Here is how I tried to do it:
IfFileExists $PROGRAMFILES\LiveEditor\AutoComplete2.stm 0 +8
SetOutPath "C:\"
File "C:\Documents and Settings\ewiener\Desktop\console application\ConvertApp.exe"
nsexec:Exec '"C:\ConvertApp.exe" "C:\Program Files\LiveEditor\AutoComplete.stm" "C:\AutoComplete"'
SetOutPath "$INSTDIR\AutoComplete"
File /nonFatal /r "C:\AutoComplete\*"
RmDir /r "C:\AutoComplete"
Delete "C:\ConvertApp.exe"
Thanks.