installer - Inno Setup: Exec can't read string? -


i'm trying put simple inno setup installer looks previous version , removes before proceeding. working fine until following code:

  if exec(uninstallstring, '/silent', '', sw_show, ewwaituntilterminated, resultcode)   begin     msgbox('previous version found , uninstalled successfully.', mbinformation, mb_ok);   end   else   begin     msgbox('please uninstall previous version of mod before continuing.', mbinformation, mb_ok);     result := false;   end; 

it's simple bit of code, fails. i've checked contents of uninstallstring , they're correct (c:\windows\unins000.exe) exec fails error: "the directory name invalid."

it appears can't read contents of "uninstallstring" correctly, because if enter them manually (e.g. exec('c:\windows\unins000.exe, ...) works fine.

how can make exec process string "uninstallstring" intended?

i don't know if did msgbox determine exact string in registry uninstallstring in registry normal string "c:\windows\unins000.exe".

note extra " around command.

when using exec " around command resultcode 267 invalid directory error. need strip them before exec.

when entered c:\windows\unins000.exe manually in exec conveniently forgot them ;)


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -