This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: IA places a return at the end of the variable.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 07, 2013
08:27 PM
IA places a return at the end of the variable.
I ran into an issue when I created an IA var with the "Execute Script/Batch file" action.
I pull the first 7 digits of the computer-name and use that IA var to replace a string in a file.
[I]Pre Install
--Execute Script
----echo off
----echo %computername:~0,7%
------store process's stdout in: $TRAILER_NUM$
Install
--Modify Text File
----replace "UGT001-" with "$TRAILER_NUM$"
I viewed the file in windows text editor and it looks fine.
I used "Beyond & Compare" to check the difference between a working file and noticed that IA puts a return at the end of the string it replaces.
I used the display message panel and verified that it adds the return. I use the "%computername:~0,7%" in batch files to modify the same text files without issue. Is there an easier way to do this?
Thanks,
Kaine
I pull the first 7 digits of the computer-name and use that IA var to replace a string in a file.
[I]Pre Install
--Execute Script
----echo off
----echo %computername:~0,7%
------store process's stdout in: $TRAILER_NUM$
Install
--Modify Text File
----replace "UGT001-" with "$TRAILER_NUM$"
I viewed the file in windows text editor and it looks fine.
I used "Beyond & Compare" to check the difference between a working file and noticed that IA puts a return at the end of the string it replaces.
I used the display message panel and verified that it adds the return. I use the "%computername:~0,7%" in batch files to modify the same text files without issue. Is there an easier way to do this?
Thanks,
Kaine
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 23, 2013
04:24 AM
Hi,
I faced similar issue..
In Pre Install
Add action SET INSTALLANYWHERE VARIABLE - Single Variable: $MY_VARIABLE$ = $TRAILER_NUM$
I had tried in one of my projects and it worked..
I faced similar issue..
In Pre Install
Add action SET INSTALLANYWHERE VARIABLE - Single Variable: $MY_VARIABLE$ = $TRAILER_NUM$
I had tried in one of my projects and it worked..
ninjadonkey wrote:
I ran into an issue when I created an IA var with the "Execute Script/Batch file" action.
I pull the first 7 digits of the computer-name and use that IA var to replace a string in a file.
[I]Pre Install
--Execute Script
----echo off
----echo %computername:~0,7%
------store process's stdout in: $TRAILER_NUM$
Install
--Modify Text File
----replace "UGT001-" with "$TRAILER_NUM$"
I viewed the file in windows text editor and it looks fine.
I used "Beyond & Compare" to check the difference between a working file and noticed that IA puts a return at the end of the string it replaces.
I used the display message panel and verified that it adds the return. I use the "%computername:~0,7%" in batch files to modify the same text files without issue. Is there an easier way to do this?
Thanks,
Kaine
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 16, 2013
09:34 AM
Nipul Patel wrote:
Hi,
I faced similar issue..
In Pre Install
Add action SET INSTALLANYWHERE VARIABLE - Single Variable: $MY_VARIABLE$ = $TRAILER_NUM$
I had tried in one of my projects and it worked..
Thanks for the reply, but it didn't work.
This is honestly the worst forum to get questions answered, this will be the last year using InstallAnywhere.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2013
04:37 PM
Have you given a thought to contacting the Flexera Software support directly?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 21, 2019
05:05 PM
I feel the same. I am also planning to get rid of IA in my project.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 24, 2019
03:56 PM
Hi @ninjadonkey,
Thank you for your post. Sorry about the delayed response and your frustration.
I agree that it would be best to open a new support ticket for this issue. If you have not already done so, could you please open a new support ticket for this issue?
Thanks,
Ian
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)