Re: choice wscript or cscript in .vbs



zloup wrote:
Pegasus (MVP) wrote:
zloup wrote:
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

Precede the script name with "cscript.exe":
cscript //nologo zloup.vbs

but j want clic on the script !!! and not tape

Set WshShell = CreateObject("WScript.Shell")

If InStr(Ucase(WScript.FullName), "WSCRIPT.EXE") Then
'Restart using CSCRIPT.EXE
WshShell.Run "CSCRIPT.EXE //nologo " & _
Chr(34) & Wscript.ScriptFullName & Chr(34)
Wscript.Quit
End If

Wscript.Echo "Host is " & WScript.FullName
WshShell.Popup "Script will close in 5 seconds.",5,"Done"

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)

.



Relevant Pages

  • Re: cscript errors when running many concurrent vbs scripts
    ... > i have a java application that spawns cscript to run a simple vbs ... > Script Host failed. ... > processes from java), i'm looking into writing a c++ dll that makes ...
    (microsoft.public.scripting.wsh)
  • RE: Using SMS to install network printers
    ... - When it spawns it has to have appropriate rights. ... directory from a command line and run the batch file. ... You might have to tweak your script a bit for error ... > cscript SCRIPTNAME.VBS ...
    (microsoft.public.sms.misc)
  • Re: Script for identifying Account to expire within X-Days then send notification email with lis
    ... Then run the script at a command prompt using the cscript host, ... The //nologo optional parameter suppresses logo information you don't want ... MVP Directory Services ...
    (microsoft.public.windows.server.scripting)
  • Re: Perfmon script not working??
    ... I had perfmon call a bat file with (cscript ... | I'm trying to monitor free disk space using Performance Monitor. ... | free space falls below a certain value I have an email.vbs script I ... | An alert was created on Windows 2003 server using the Logical Disk ...
    (microsoft.public.win2000.general)
  • Re: Anonymous works 1 Day ??
    ... If you run CSCRIPT //h:CSCRIPT that will set CSCRIPT as the default script ... This right is needed for IIS to logon the anonymous user though. ...
    (microsoft.public.inetserver.iis.security)

Loading