Inno Setup StringChangeEx Failure -
i'm using inno setup script install 32- , 64-bit dlls in 64-bit install. can 64-bit path registry setting, 32-bit path missing not exist. however, know path's 'tail' constant, head needs modified. ie,
64-bit (from registry) = c:\program files\my application\bin 32-bit (derived) = c:\program files (x86)\my application\bin
so swap out 64-bit program file path 32-bit one. stringchangeex:
regquerystringvalue(hklm, 'software\my application', 'rootdir', spath) if iswin64() stringchangeex(spath, expandconstant('{pf}'), expandconstant('{pf32}'), false);
spath returned 32-bit path. works great on systems, seems stringchangeex not swap out 'c:\program files' 'c:\program files (x86)'. have verified (using msgbox's) {pf} , {pf32} constants think are. casing same , there no leading/trailing spaces. seems on systems, function doesn't work.
i'm using latest version of innosetup (10/2010). web site doesn't mention problems function. has else seen and/or have ideas on be?
i threw little script , using 5.4.0 (10/2010 release), worked:
; script generated inno setup script wizard. ; see documentation details on creating inno setup script files! [setup] ; note: value of appid uniquely identifies application. ; not use same appid value in installers other applications. ; (to generate new guid, click tools | generate guid inside ide.) appid={{ae1a6bbb-7582-43aa-85f5-c7f984d1a68b} appname=my program appversion=1.5 ;appvername=my program 1.5 apppublisher=my company, inc. apppublisherurl=http://www.example.com/ appsupporturl=http://www.example.com/ appupdatesurl=http://www.example.com/ defaultdirname={pf}\my program defaultgroupname=my program outputbasefilename=setup compression=lzma solidcompression=yes [code] function initializesetup(): boolean; var spath : string; begin spath := expandconstant('{pf}') + '\mypath'; if iswin64() stringchangeex(spath, expandconstant('{pf}'), expandconstant('{pf32}'), false); msgbox(spath, mbinformation, mb_ok); result := true; end;
does script work or fail you?
spath correct before call stringchangeex?
i suggest /log option code isn't logged automatically. need add log(const s: string) calls.
Comments
Post a Comment