#1 21 Nov 2010 21:59

npocmaka
Member
From: Bulgaria
Registered: 03 Dec 2009
Posts: 430

Change script engine inside the script

Does anybody know how can I change script engine(Wscrip/Cscript) inside the script.
In the same script I want conslole output which doesn't need user interation and windows output with buttons.
I've seen such thing before but now I can't find the link.

Offline

#2 02 Dec 2010 22:15

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 998
Website

Re: Change script engine inside the script

Try this

Set objShell = CreateObject("WScript.Shell")
objShell.run("cscript C:\scripts\demo.vbs")
Set objShell = CreateObject("WScript.Shell")
objShell.run("wscript C:\scripts\demo.vbs")

Offline

Board footer

Powered by FluxBB