DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Load and run a vbscript in aother vbscript - Diadem2015

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!

0 Kudos
Message 1 of 2
(75 Views)

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.

DIAdem experience since 1996

Turn-key applications - Remote and on-site trainings - On-the-job training

| müller+krahmer GmbH | Koenitzer Straße 14, 07338 Kaulsdorf / Germany |
| Phone: +49 36733 / 2328 - 6 | Mobile: +49 160 / 287 7294 |
| Email: mueller@mueller-krahmer.de | Web: www.mueller-krahmer.de |
0 Kudos
Message 2 of 2
(46 Views)