Student Name| | Class| Comp230| Date| 5/16/2013| VBScript IPO VBox Lab Report ' VBScript: NameAge. vbs ' Written by: ' Date: 5/16/2013 ' Class: Comp230 ' Professor: Giao Dau ' ===================================== 'Create name and age variables name = "" ageStr = "" ' Prompt User for Name and Age WScript. StdOut.

Write("Please Enter your Full Name ....

.....

..... ") name = WScript.

StdIn. ReadLine() WScript. StdOut. WriteLine() 'Skip 1 line WScript. StdOut.

Write("Please Enter you age .....

......

.....

....

. ") ageStr = WScript. StdIn. ReadLine() ' Calculate Age+10 and assign to ageStr10 ageStr10 = CStr( CInt(ageStr)+10 ) Display Name and Age Vales WScript. StdOut. WriteBlankLines(2) 'Skip 2 lines WScript.

StdOut. WriteLine("Your Name is " ; vbTab ; vbTab ; name) WScript. StdOut. WriteLine("Your Age is " ; vbTab ; vbTab ; ageStr) WScript. StdOut. WriteLine(vbCrlf ; "You Age in 10 years is .

.....

" ; ageStr10 ; vbCrlf) WScript. StdOut. WriteLine("End of Program") ' VBScript: NameAge. vbs ' Written by: ' Date: 5/16/2013 ' Class: Comp230 ' Professor: Giao Dau ' ===================================== 'Create name and age variables name = "" ageStr = "" ' Prompt User for Name and Age WScript.

StdOut.Write("Please Enter your Full Name ...

....

....

... ") name = WScript. StdIn. ReadLine() WScript.

StdOut. WriteLine() 'Skip 1 line WScript. StdOut. Write("Please Enter you age .

....

.....

......

....

. ") ageStr = WScript. StdIn. ReadLine() ' Calculate Age+10 and assign to ageStr10 ageStr10 = CStr( CInt(ageStr)+10 ) ' Display Name and Age Vales WScript.

StdOut. WriteBlankLines(2) 'Skip 2 lines WScript. StdOut. WriteLine("Your Name is " ; vbTab ; vbTab ; name) WScript. StdOut.

WriteLine("Your Age is " ; vbTab ; vbTab ; ageStr) WScript. StdOut. WriteLine(vbCrlf ; "You Age in 10 years is ...

... & ageStr10 & vbCrlf) WScript.

StdOut. WriteLine("End of Program") Copy your NameAge. vbs program from NotePad++ and paste it into the space provided below:. Capture the NameAge. vbs Run from the console window and copy it into the space provided below: cscript NameAge. vbs Process started >>> Microsoft (R) Windows Script Host Version 5.

8 Copyright (C) Microsoft Corporation. All rights reserved. Please Enter your Full Name ...

....

....

... Please Enter you age ...

......

.....

......

. 26 Your Name is Your Age is 26 You Age in 10 years is .....

. 36 End of Program <<< Process finished. (Exit code 0) =============== READY ================ cscript NameAge. vbs Process started >>> Microsoft (R) Windows Script Host Version 5. 8 Copyright (C) Microsoft Corporation.

All rights reserved. Please Enter your Full Name ....

.....

.....

Please Enter you age .....

.....

......

.....

26 Your Name is Your Age is 26 You Age in 10 years is .....

. 36 End of Program <<< Process finished. (Exit code 0) ================ READY ================ ' VBScript: PopUpWindow. vbs ' Written by: ' Date: 5/16/2013 ' Class: Comp230 ' Professor: Giao Dau ' ===================================== 'Create name and age variables ame = "Jon Doe" ageStr = "50" ' Calculate Age+10 and assign to ageStr10 ageStr10 = CStr( CInt(ageStr)+10 ) ' Buil outut as a single string msgStr msgStr = "Your Name is " & vbTab & vbTab & name & _ vbCrlf & "Your Age is " & vbTab & vbTab & ageStr & _ vbCrlf & vbCrlf & "You Age in 10 years is ...

... " & _ ageStr10 & vbCrlf & vbCrlf &"End of Program" 'One Echo Statement for all output WScript.

Echo msgStr ' VBScript: PopUpWindow. vbs ' Written by: ' Date: 5/16/2013 ' Class: Comp230 ' Professor: Giao Dau ' ===================================== Create name and age variables name = "Jon Doe" ageStr = "50" ' Calculate Age+10 and assign to ageStr10 ageStr10 = CStr( CInt(ageStr)+10 ) ' Buil outut as a single string msgStr msgStr = "Your Name is " & vbTab & vbTab & name & _ vbCrlf & "Your Age is " & vbTab & vbTab & ageStr & _ vbCrlf & vbCrlf & "You Age in 10 years is ...

... " & _ ageStr10 & vbCrlf & vbCrlf &"End of Program" 'One Echo Statement for all output WScript.

Echo msgStr Copy your PopUpWindow. vbs program from NotePad++ and paste it into the space provided below: Capture the PopUpWindow. bs Run (using <Alt><PrtSc> to capture the PopUp Window on the desktop) and copy it into the space provided below: ' VBScript: CmdArgs. vbs ' Written by: ' Date: 5/16/2013 ' Class: Comp230 ' Professor: Giao Dau ' ===================================== ' Check for Command Line Arguments Set args = WScript.

Arguments If args. Count < 2 Then WScript. Echo "You must enter the name age as Command Line Arguments!! " WScript. Sleep(5000) WScript.

Quit End If ' Assign name and age variables to Cmd Line Args name = args. item(0) ageStr = args. item(1) ' Calculate Age+10 and assign to ageStr10 geStr10 = CStr( CInt(ageStr)+10 ) ' Buil outut as a single string msgStr msgStr = "Your Name is " & vbTab & vbTab & name & _ vbCrlf & "Your Age is " & vbTab & vbTab & ageStr & _ vbCrlf & vbCrlf & "You Age in 10 years is ....

.. " & _ ageStr10 & vbCrlf & vbCrlf &"End of Program" 'One Echo Statement for all output WScript. Echo msgStr ' VBScript: CmdArgs. vbs ' Written by: ' Date: 5/16/2013 ' Class: Comp230 ' Professor: Giao Dau ' ===================================== ' Check for Command Line Arguments Set args = WScript.

Arguments If args.Count < 2 Then WScript. Echo "You must enter the name age as Command Line Arguments!! " WScript. Sleep(5000) WScript. Quit End If ' Assign name and age variables to Cmd Line Args name = args.

item(0) ageStr = args. item(1) ' Calculate Age+10 and assign to ageStr10 ageStr10 = CStr( CInt(ageStr)+10 ) ' Buil outut as a single string msgStr msgStr = "Your Name is " & vbTab & vbTab & name & _ vbCrlf & "Your Age is " & vbTab & vbTab & ageStr & _ vbCrlf & vbCrlf & "You Age in 10 years is ...

... " & _ ageStr10 & vbCrlf & vbCrlf &"End of Program" One Echo Statement for all output WScript. Echo msgStr Copy your CmdArgs.

vbs program from NotePad++ and paste it into the space provided below: C:Scripts>cscript CmdArgs. vbs Microsoft (R) Windows Script Host Version 5. 8 Copyright (C) Microsoft Corporation. All rights reserved. You must enter the name age as Command Line Arguments!! C:Scripts>cscript CmdArgs. vbs "" 26 Microsoft (R) Windows Script Host Version 5.

8 Copyright (C) Microsoft Corporation. All rights reserved. Your Name is Your Age is 26 You Age in 10 years is ...

... 36 End of Program C:Scripts>C:Scripts>cscript CmdArgs. vbs Microsoft (R) Windows Script Host Version 5. 8 Copyright (C) Microsoft Corporation.

All rights reserved. You must enter the name age as Command Line Arguments!! C:Scripts>cscript CmdArgs. vbs "" 26 Microsoft (R) Windows Script Host Version 5. 8 Copyright (C) Microsoft Corporation.

All rights reserved. Your Name is Your Age is 26 You Age in 10 years is .....

. 36 End of Program C:Scripts> Capture the two CmdArgs. vbs console Runs (one without arguments and one using your name and age as arguments) and copy the runs into the space provided below: