Hello,
I understand that InstallAware replaces double backslashes with single ones \\ =>
Can I avoid this behavior?
I have a problem with the Run Program action which should run $TARGETDIR$\postinstaller.exe with command line parameters such as
/install="$TARGETDIR$\config.dll"
When $TARGETDIR$ contains a UNC path (starts with \\ ), the Run Program action can execute the file, but the $TARGETDIR$ variable in the command line parameters is changed, and thus the path in the command line parameters is invalid.
Double backslashes removed
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Double backslashes removed
Dear Rasmusw,
just try to add an additional backslashes to your parameter argument, when the argument variable contains an UNC path (starts with \\ ).
Example;
The same as IA clipboard format;
With the above code I used "cmd.exe /k ECHO ON", for the sole purpose to print out the effective argument value passed out by "Run Program".
Hope this helps you.
Regards.
just try to add an additional backslashes to your parameter argument, when the argument variable contains an UNC path (starts with \\ ).
Example;
Code: Select all
Set Variable MY_EXE_PATH to \\PC-NAME\path\myApp.exe
if Variable MY_EXE_PATH Contains \\PC-NAME
Set Variable MY_EXE_PATH to \$MY_EXE_PATH$
end
Run Program cmd.exe /k ECHO ON "$MY_EXE_PATH$" (WAIT)
The same as IA clipboard format;
Code: Select all
~InstallAware Clipboard Data~
~Run Program~
~{D3793EA0-A514-4AE5-B329-180F9E54F7A2}~
~cmd.exe~
~FALSE~
~/k ECHO ON "$MY_EXE_PATH$"~
~TRUE~
~~
~End~
~{95590036-9CA9-428E-808E-2E7F8144081A}~
~Set Variable~
~{3F228688-5115-4CB4-A082-70DF5CA2F588}~
~MY_EXE_PATH$MYAH$MYAH$FALSE~
~\$MY_EXE_PATH$~
~If~
~{15E38E3F-33D8-4828-982C-EC2A6126ABC2}~
~MY_EXE_PATH~
~1~
~\\PC-NAME~
~FALSE~
~Comment~
~{BACC8D4A-57A4-4005-8CA7-52DDDA0F8B79}~
~~
~Set Variable~
~{7EF7EB77-25F6-4F06-B8E6-EB8112684FFC}~
~MY_EXE_PATH$MYAH$MYAH$FALSE~
~\\PC-NAME\path\myApp.exe~
With the above code I used "cmd.exe /k ECHO ON", for the sole purpose to print out the effective argument value passed out by "Run Program".
Hope this helps you.
Regards.
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Double backslashes removed
Hello Francesco,
thank you for your suggestion, I will try it.
Best regards,
Rasmus
thank you for your suggestion, I will try it.
Best regards,
Rasmus
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Double backslashes removed
It should work ... I used the same with a project.
Regards
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Double backslashes removed
Has this been improved in the latest releases, e.g. X17, to turn off the behavior? It's a pain to anticipate this all over an installer and apply workarounds.
Also, the behavior is very annoying when the user tries to actually type double-backslashes.
Also, the behavior is very annoying when the user tries to actually type double-backslashes.
Re: Double backslashes removed
This topic applies to InstallAware Multi Platform as well.
Each programming language has its own escape sequence for particular characters, this is simply how it works for InstallAware.
Each programming language has its own escape sequence for particular characters, this is simply how it works for InstallAware.
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
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
Re: Double backslashes removed
I'm not necessarily talking about the programming language, but the auto-replacement of the double-backslash in the edit box, as the user types in.
Can that actually be explained by the data flow as the user types, say back and forth from the UI into the variables, and thus the replacement happens?
In any case, you can imagine how annoying this can be for the end user, typing one thing and seeing another. At one point, the cursor even jumps back to the beginning of the string, and typing more backslashes doesn't do anything.
Can that actually be explained by the data flow as the user types, say back and forth from the UI into the variables, and thus the replacement happens?
In any case, you can imagine how annoying this can be for the end user, typing one thing and seeing another. At one point, the cursor even jumps back to the beginning of the string, and typing more backslashes doesn't do anything.
Re: Double backslashes removed
Oh, most interesting!
Please provide a minimum reproducing project for further research and escalation.
Please provide a minimum reproducing project for further research and escalation.
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
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
Re: Double backslashes removed
JohnGaver wrote:Please provide a minimum reproducing project for further research and escalation.
Simply create a new project in X17 and "bind" a user variable to an edit box using the "[Written variable value]" option. The other options there seem fine, like the “Installation Folder“, but are not appropriate for the task at hand.
I'm guessing that the behavior is intentional, but there's a need for a generic option that will allow any input, w/out parsing for escapes.
Who is online
Users browsing this forum: No registered users and 32 guests