Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Execute statement problem

hey there,

i need to execute a vbs file directly from the load script of QV.

my actual code is this one:

SET vCSCRIPT = c:\windows\system32\cscript.exe;

EXECUTE $(vCSCRIPT) C:\Documents and Settings\user\Desktop\VB\Delete_first_X_lines_cycle.vbs;

No errors are given but the file is not executing. The document has execute permissions and the vbs when manualy started works properly.

Any ideas?

Thnks in advance

JuanPedro

1 Solution

Accepted Solutions
marcus_sommer

with quotas it works ...

SET vCSCRIPT = 'c:\windows\system32\cscript.exe';

EXECUTE $(vCSCRIPT) "C:\Documents and Settings\user\Desktop\VB\Delete_first_X_lines_cycle.vbs";

- Marcus

View solution in original post

6 Replies
Not applicable
Author

Still not able to run .vbs with execute.

My momentary workaround is to execute a .bat file that runs the .vbs

I dont really like this solution so any hint is appreciated.

Have a nice day

ToniKautto
Employee
Employee

The string that will be executed is below. Will it work if you execute it manually in a command prompt?

c:\windows\system32\cscript.exe C:\Documents and Settings\user\Desktop\VB\Delete_first_X_lines_cycle.vbs

I would guess that the path including white spaces would require quotes in order to be executable.

c:\windows\system32\cscript.exe "C:\Documents and Settings\user\Desktop\VB\Delete_first_X_lines_cycle.vbs"


Not applicable
Author

Try calling Call "functionname()" in .vbs file.  also try to pipe the output to some text file.

eg. cscript myScript.vbs >> c:\scriptslog\log.txt

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Just try this.

     EXECUTE cscript C:\Documents and Settings\user\Desktop\VB\Delete_first_X_lines_cycle.vbs

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
marcus_sommer

with quotas it works ...

SET vCSCRIPT = 'c:\windows\system32\cscript.exe';

EXECUTE $(vCSCRIPT) "C:\Documents and Settings\user\Desktop\VB\Delete_first_X_lines_cycle.vbs";

- Marcus

Not applicable
Author

The quotes did the job!

usefull the log file aswell.

thnks everyone for your time and anserws

Have a nice day.