DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

/CScriptStart

Solved!
Go to solution

 

Hello,
When I run one script with one .exe with the command:
"D:\Archivos de programa\National Instruments\DIAdem 10.2\Diadem.exe" "/CT1:='xyz'" "/CScriptStart('C:\Documents and Settings\...\IDIADA DynAsoft.vbs')"

The script runs very very slow, more than if I open Diadem manually and I runs the script by F5.

 

I used Diadem 10.2, but if I used Diadem 11.0 the script runs slowly too, but not as much as Diadem 10.2

 

How I can fix this? Because I need to run with the .exe.

 

Thanks

0 Kudos
Message 1 of 5
(4,350 Views)

Hello !!

 

I found that the problem of slow comming by this code:

 

Set ws = CreateObject("WScript.Shell")

If FileExist(AutoDrvUser&"XXX.exe") Then

Set VarApp = ws.Exec(AutoDrvUser & "XXX.exe")
   While VarApp.Status=0
     Call Pause()
    Wend

 

Set ws = CreateObject("WScript.Shell")

If FileExist(AutoDrvUser&"XXX.exe") Then

Set VarApp = ws.Exec(AutoDrvUser & "XXX.exe")  

While VarApp.Status=0    

Call Pause()  

Wend

End If


If VarApp.Status=0 then..

 

 

What Can I do?

0 Kudos
Message 2 of 5
(4,345 Views)

Hi s.g.m.,

 

Hmmm, I haven't tried that particular Windows Shell method to run external *.exe programs.  Usually if you're running a DIAdem VBScript and you want to run an external program, you use the "ExtProgram()" command.  You can also use the "FilExist()" function to check if the *.exe" is present first.  I've also had good luck with the Windows Shell method "Run".

 

Please give that a try and let me know if it runs faster,

Brad Turpin

DIAdem Product Support Engineer
National Instruments

Message 3 of 5
(4,331 Views)

Hello Brad, 

 

thank you for the question but I have one question, what is the way to control when program is finish?

0 Kudos
Message 4 of 5
(4,319 Views)
Solution
Accepted by topic author s.g.m.

Hello Brad, 

 

 

I've solved the problem, I implemented a function that returns if XXX.exe is still running in task list of windows.

 

The function ExtProgram()  run Diadem faster than the other function. I don't have problems now!

 

 

Thanks!!:

 

 

 

0 Kudos
Message 5 of 5
(4,312 Views)