Re: choice wscript or cscript in .vbs
- From: Tom Lavedas <tglbatch@xxxxxxx>
- Date: Wed, 14 May 2008 11:14:37 -0700 (PDT)
On May 14, 1:32 pm, "zloup" <zl...@xxxxxxxx> wrote:
thank you
but j want clic on the script !!! and not tape
"Pegasus (MVP)" <I....@xxxxxxxxxx> a écrit dans le message de news:
eOO%23oUetIHA.5...@xxxxxxxxxxxxxxxxxxxxxxx
"zloup" <zl...@xxxxxxxx> wrote in message
news:482b0ebf$0$837$ba4acef3@xxxxxxxxxxxxxxxxx
Hello
How to choice wscript or cscript in a .vbs.
i want cscript when i go a script on an unknow PC, when i don't know the
script for default
thank you
Precede the script name with "cscript.exe":
cscript //nologo zloup.vbs
One way to do that on an arbitrary machine is to Right-click, select
Open with, Choose program and then select "Microsoft (R) Console Based
Script Host" from the Other programs section of the dialog box.
I tested this in WinXP. The exact steps might very on other versions
of Windows.
Another way is to first go to Start/Run and key in ...
cscript //h:cscript
and click OK. This will set the default host to cscript.exe until
sush time as it is altered with a line like ...
cscript //h:Wscript
After this, clicking on a VBS file in explorer will execute it under
cscript.exe - though a console window will open, you will not see any
output from the script, if it has any ECHOs in it (the action of GUI
Popups or Msgboxs is unchanged). ECHOed output appears only if the
script is executed as Pegasus suggested - in an already opened
console window.
If you would like to see a GUI confirmation message when converting
from one host to the other use Wscript at the Run line in place of the
first cscript.
Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
.
- References:
- choice wscript or cscript in .vbs
- From: zloup
- Re: choice wscript or cscript in .vbs
- From: Pegasus \(MVP\)
- Re: choice wscript or cscript in .vbs
- From: zloup
- choice wscript or cscript in .vbs
- Prev by Date: Re: choice wscript or cscript in .vbs
- Next by Date: Re: choice wscript or cscript in .vbs
- Previous by thread: Re: choice wscript or cscript in .vbs
- Next by thread: Re: choice wscript or cscript in .vbs
- Index(es):
Relevant Pages
|
Loading