Friday, April 04, 2014

Windows Scripting (the normal shell) for Ex VB Programmers - Lesson 1

Windows Scripting (the normal shell) for Ex VB Programmers - Lesson 1

Good if you know the old Visual Basic

1. How to write your first script. (lets call this as first.vbs)

1. run cmd.exe

2. create a folder called c:\scripts

3. run notepad first.vbs

clip_image002

4. Save and run this file as follows

clip_image004

5. Try to run the file without using cscript and see what you get

clip_image006

6. This is because by default vbs files are executed using wscript

7. what if you wanted to change the default. Do the following

clip_image008

8. What if you wanted to change back the default to wscript

wscript //H:wscript

-----------------------------------------------------------------end of lesson

No comments: