Windows Scripting
  Home arrow Windows Scripting arrow Page 4 - Getting Started With WSH 5.6
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Getting Started With WSH 5.6
By: Norbert Cartagena
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 15
    2003-09-03

    Table of Contents:
  • Getting Started With WSH 5.6
  • Are you Ready?
  • Heeeeeeeere's Your Host...
  • New Contestants, Come On Down!
  • Let's Get This Show On The Road
  • Example Scripts
  • Roll The Credits

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Getting Started With WSH 5.6 - New Contestants, Come On Down!


    (Page 4 of 7 )

    Now, what about Perl, Python, and all those other scripting languages that I promised you that you could run? After all, don't they have other extensions, like .plx and .py? Unfortunately, it wasn't until version 2.0 that WSH could run anything other than .vbs and .js scripts. In the later versions, Microsoft teamed up with a number of third parties to increase scripting language support for WSH. Still, if you try to run a Perl program with a .plx extension, it'll simply run as a Perl program. The same goes for Python. The way Microsoft's added this functionality and still kept it all under control is by implementing XML and tacking on the .wsf extension to these files. The biggest advantage of doing this is the ability to run multiple languages within one script, such as is the case in the following script:

    <?XML version="1.0" ? >
    <!-- 
    FilenameHello.wsf-->
    <
    job>
    <
    script language="VBScript">
    WScript.Echo "Hello, from you VBScript friends! Please press OK."
    </script>
    <script language="JScript">
    WScript.Echo ("Hey, this is JScript. Can you click OK again? I can't quite reach it.") ;
    </script>
    </job>

    Notice the switch in languages in line 7. This functionality allows you to perform multi-paradigmic tasks in one script. This comes especially handy when you're dealing with two totally different languages, such as VBScript and PerlScript. It also makes it easier to write reusable code and specify references to external type libraries.

    Now that you understand a bit about what WSH is and what it does it's time to start using it.

    More Windows Scripting Articles
    More By Norbert Cartagena


     

    WINDOWS SCRIPTING ARTICLES

    - A Portable Scripting Toolbox
    - WPF Through an Example: Introduction
    - Beginning SharePoint Web Part Development
    - More Alternative Languages for WSH
    - WPF Control Layout
    - WSH in Other Languages
    - Screen Capturing via GDI+ and GDI
    - Understanding Procedures in VBScript
    - Printing Documents in WSH
    - Generating Outlook Signatures Based on Activ...
    - VBScript: Converting and Formatting with Fun...
    - VBScript: Conversion and Format Functions
    - VBScript: Array Functions
    - VBScript: Strings, You Can`t Function withou...
    - VBScript: More String Functions





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway