11-05-2024 08:10 AM
Hello colleagues,
I need to create a script witch should run another script inside.
Let's call script A - new script and script B- old script with calculation inside.
Script A is located in: \\Desktop\Script\
Script B is located in: \\Desktop\Script\01.Before
I try to use:
Dim filepathh,objshell
filepathh = Chr(34) & "C:\Users\xxxxxx\Desktop\script\01.Before\scriptB.vbs" & Chr(34)
Set objShell = CreateObject("WScript.Shell")\
objshell.Run "wscript.exe " & filepathh, 0, True
Set objShell = Nothing
But I have Windows Script Host error from script B when running script A " Variable is undefined :"ScriptCmdReset" code 800A01F4. This error occurs only when try to run script B from script A. If I run script B in solo mode, running without any kind of problem.
How should I handle this?
Thank you in advance!
11-08-2024 07:40 AM
There are two ways to run a script from another script within DIAdem:
Call ScriptStart(ScriptFile, [VBSProcName])
and
Call ScriptInclude(ScriptFile, [ScriptScope])
For the differences between these two see DIAdem help.