Read from text file Not Working

Got a problem you cannot solve? Try here.
vaibhavopkey
Posts: 45
Joined: Wed Feb 05, 2025 6:13 am

Read from text file Not Working

Postby vaibhavopkey » Tue May 06, 2025 1:29 pm

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~
~~

JohnGaver
Posts: 213
Joined: Mon Feb 05, 2024 6:15 pm

Re: Read from text file Not Working

Postby JohnGaver » Tue May 06, 2025 1:33 pm

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.
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm

vaibhavopkey
Posts: 45
Joined: Wed Feb 05, 2025 6:13 am

Re: Read from text file Not Working

Postby vaibhavopkey » Tue May 06, 2025 10:40 pm

$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$

JohnGaver
Posts: 213
Joined: Mon Feb 05, 2024 6:15 pm

Re: Read from text file Not Working

Postby JohnGaver » Wed May 07, 2025 1:49 pm

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)?
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 145 guests