When we run script under our new framework, we found that will missing the “FrameworkErrorHandler.vbs” in Recovery Scenario.
For the better transplantation, we use the relevant path for all items in new framework, but once we generate the QRS file, the relevant path will change to absolute path, and we can’t modify this path any more.
Now that this file is change to absolute path, and need to in keeping with relevant path in framework, I thought a way to specify a path, and generate the “FrameworkErrorHandler.vbs” dynamically:
Before we run the test cases, copy the “FrameworkErrorHandler.vbs” in framework to root directory of C disk.
Set fso = CreateObject( "Scripting.FileSystemObject" )
fso.CopyFile oParentFolder + "FrameworkErrorHandler.vbs", "c:\FrameworkErrorHandler.vbs"
fso.GetFile("c:\FrameworkErrorHandler.vbs").Attributes = 0 'set file attribute to nomal
No matter you put the framework in anywhere of your PC, QRS file can find and read the custom recovery scenario function file successfully.