Page 1 of 1

Read from text file Not Working

Posted: Tue May 06, 2025 1:29 pm
by vaibhavopkey
I am using InstallAware Multi-Platform Version 2025,I'm using below code but i'm not getting text file content

Code: Select all

 
Set Variable USERTARGETDIR to
Read from Text File $UAC$UAC_CHECK\target.txt into Variable USERTARGETDIR (get EOF into done)
MessageBox: , $USERTARGETDIR$ -- $done$


getting true in $done$ variable but nothing in $USERTARGETDIR$

Code: Select all

~InstallAware Multi Platform Clipboard Data~
~MessageBox~
~{4E479101-88BF-4892-8069-BD726A93E9D4}~
~~
~$USERTARGETDIR$ -- $done$~
~0~
~1~
~~
~Read from Text File~
~{0C891987-0870-48D7-AB77-948785B395EB}~
~$UAC$UAC_CHECK\target.txt~
~USERTARGETDIR~
~done~
~Set Variable~
~{21DB6DF4-4AEC-4164-AE17-5A891B1A7926}~
~USERTARGETDIR$MYAH$MYAH$FALSE~
~~

Re: Read from text file Not Working

Posted: Tue May 06, 2025 1:33 pm
by JohnGaver
You don't need to call Set Variable, Read from Text File will do it for you automatically.

"$UAC$UAC_CHECK" seems to be an undefined and/or a malformed variable.

Re: Read from text file Not Working

Posted: Tue May 06, 2025 10:40 pm
by vaibhavopkey
$UAC$/UAC_CHECK is properly defined and it's working.
Here is my full code

Code: Select all

Set Variable UAC to
Get Folder Location System->Application Data Directory into UAC
Comment: Set Variable USERTARGETDIR to
Does Folder Exist $UAC$/UAC_CHECK (get result into variable FOLD)
if Variable FOLD Equals TRUE
  Read from Text File $UAC$UAC_CHECK\target.txt into Variable USERTARGETDIR (get EOF into done)
end
MessageBox: , $USERTARGETDIR$ -- $done$

Re: Read from text file Not Working

Posted: Wed May 07, 2025 1:49 pm
by JohnGaver
Sadly, this one I'm not able to reproduce for you.

Maybe ensure your slashes are in the proper Windows notation (backslashes instead of forward slashes)?