Author Topic: Error installing Winbatch due to StrCat  (Read 285 times)

WBpk9

  • Newbie
  • *
  • Posts: 3
Error installing Winbatch due to StrCat
« on: July 07, 2021, 03:00:52 pm »
I get an error message when I try to install WinBatch into folder that has both parentheses () and {}. How can I get around this issue. I need to have () and {} which are exceptable folder names.

td

  • Tech Support
  • *****
  • Posts: 3947
    • WinBatch
Re: Error installing Winbatch due to StrCat
« Reply #1 on: July 07, 2021, 05:25:37 pm »
The problem isn't the parentheses or braces.  It is the grave accent character in a string delimited by grave accent characters.  You are very strongly encouraged to only install WinBatch into the program files (x86) directory and yes, we know that you have been installing it for years in another directory without issue. If you continue to do that, it will eventually come back to bite you. So your options are to get rid of the grave accent character in the name or install WinBatch in the correct directory.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

  • Tech Support
  • *****
  • Posts: 3947
    • WinBatch
Re: Error installing Winbatch due to StrCat
« Reply #2 on: July 08, 2021, 10:19:11 am »
This does illustrate the evils of using WIL substitution in a script. The setup script has been around for almost as long as WinBatch. But while most of it has been rewritten more than once, a few bits still linger from the early versions. You have encountered one of those early bits and it is still using substitution. That legacy code will be corrected in the next release.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

WBpk9

  • Newbie
  • *
  • Posts: 3
Re: Error installing Winbatch due to StrCat
« Reply #3 on: July 09, 2021, 06:30:32 am »
Thank you TD for the quick reply and how to resolve. One of the great things about WinBatch.
For my education why do you recommend using the default install folder. Is there hard coding to those folders that will bite me in the future.
Kind regards

td

  • Tech Support
  • *****
  • Posts: 3947
    • WinBatch
Re: Error installing Winbatch due to StrCat
« Reply #4 on: July 09, 2021, 07:25:46 am »
It's not a matter of hard coding.  It has to do with how MSFT has implemented security in Windows.  Applications that interact with the user interface (like WinBatch) have special requirements in order to execute correctly when performing some tasks.  One of those requirements is that they must be launched from a "secure" folder. "Program Files (x86)" and "Program Files" have access restrictions that make them "secure" by default. Most other folders do not by default have those settings.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

WBpk9

  • Newbie
  • *
  • Posts: 3
Re: Error installing Winbatch due to StrCat
« Reply #5 on: July 09, 2021, 08:17:26 am »
Thank you for the description.
Does that mean that compiled WinBatch scripts need to be installed and run from these folders "Program Files (x86)" and "Program Files".
Thank you

td

  • Tech Support
  • *****
  • Posts: 3947
    • WinBatch
Re: Error installing Winbatch due to StrCat
« Reply #6 on: July 09, 2021, 01:27:08 pm »
That would depend on what they do and how they are manifested. If the script is compiled with "UIAccess" set to "true" then it should be installed into a "secure" folder. If tested and confirm that the script does not need that setting in any of its run environments and user accounts then you can likely get by without "secure" folder installation. However, some antimalware programs take a dim view of compiled scripts not installed in "secure" folders so that is something you need to consider as well.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade