KNOWN ISSUE: Search for File action in WiseScript and the character string length reaches over 266 characters, the install aborts.

Article:TECH41094  |  Created: 2009-01-06  |  Updated: 2009-01-06  |  Article URL
Article Type
Technical Solution


 When the Search for File action is used in WiseScript, the installation closes abruptly and a Windows error message is displayed if the path variable goes beyond 266 total characters during the search.

Steps to Reproduce:

  1. Open up WiseScript Editor (or WiseScript Package Editor)
  2. Create a Search for file action.
  3. Change the search depth to 15.
  4. Place the file that you are searching for in a directory that contains 14 folders. Place this file in the last folder.
  5. Make the entire character string, Filename + Folders, Greater then 266 characters.
  6. Retest the script changing the characters so that they total 255 characters.
  7. Test again with the characters between 257-266 characters.

When the character string goes beyond 266 the installation should not crash or abort. A dialog should prompt the creator stating that the string has exceeded its maximum limit (or something of the sort).




When doing a Search for file action, the name of the file that is being searched is added in the file name. When the Script runs and it reaches the point where it searches for the file, it will search through local, network or both drives for this file. When searching for the file, if the total character length of the file including all the folders is 256 or less (i.e. if the file name is test.exe there are a total of 9 characters in this name. Combining this with C:/application/program/test.exe there are a total of 31 characters in this entire pathname) the installation will execute successfully. The search for file will only read up to 256 characters. If the string length is 257-266 characters, the system will read this statement as false, and not execute properly. If the character string goes beyond 266 characters, the installation crashes completely.


Workaround:  Shorten the character string length of all the directories so that they are less then 266 characters, or change the search depth.

Legacy ID


Article URL

Terms of use for this information are found in Legal Notices