frequently ask ? : Computers : Programming : Languages : Wsh

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 3 people (67%) answered Yes
Recently 2 of 3 people (67%) answered Yes

Entry

Computer: Language: Windows Scripting Host: WSH: How to create simple program in WSH? [hello world]

Jun 18th, 2005 04:05
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 18 Juny 2005 - 05:51 pm -----------------------
Computer: Language: Windows Scripting Host: WSH: How to create simple 
program in WSH? [hello world]
---
---
Steps: Overview:
 1. -Create a text file with commands
 2. -Save it as
      <your filename>.vbs (if Visual Basic Script)
       or
      <your filename>.js (if JScript)
       or
      <your filename>.wsh (this is language independent)
       or
      <your filename>.wsf (this is language independent)
 3. -Run it by typing
       cscript.exe <your filename>.<your script language name>
        or similarly
       wscript.exe <your filename>.<your script language name>
---
Steps: Worked out:
 1. -Create a text file with commands
--- cut here: begin --------------------------------------------------
   Dim count
   WScript.Echo "Hello world from Windows Scripting Host"
   WScript.Echo ""
   For count = 1 to 3
    WScript.Echo count
   Next
--- cut here: end ----------------------------------------------------
 2. -Save it as
      helloworld.vbs
 3. -Run it by typing
      cscript.exe helloworld.vbs
 4. -This will show as output
--- cut here: begin --------------------------------------------------
      Hello world from Windows Scripting Host
      1
      2
      3
--- cut here: end ----------------------------------------------------
---
---
Book: see also:
---
[book: Fredell, Thomas - Sams teach yourself Windows Scripting Host in 
21 days - ISBN 0-672-31374-X - p. 8 'Introduction']
---
---
Internet: see also:
---
Computer: Language: Windows Scripting Host: WSH: Link: Can you give an 
overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/36754/fid/766
----------------------------------------------------------------------