Upgrading Software with Vbscript

1489 Words Mar 29th, 2015 6 Pages
UPGRADING SOFTWARE USING VBSCRIPT

CLAUDE GILLMAN

COMP 230 COURSE PROJECT

Table of Contents

1) Introduction3
Requirement for system administration3
2) Description of program4
Contents of program4 How it works4
3) Source Code with detailed comments5
Source Code contains a minimum 5 out of 6 topics learned during this session.5
4) Source Code continued6 Notes on the output 13 Screenshots of the output 13
5) Conclusion14 Possible future uses14
6) References15

Our company is currently planning to automate many different system administration tasks. I have researched a system administration task, in this case upgrading software using VBScript. I have included a proposal that describes
…show more content…
After the "List of applicable items on the machine:" the loop displays the list of available updates. The next loop installs the update if user inputs "1 for "Ok" and 0 for "No" (Upgrade Software Upgrade Software Upgrade Software - VBScript sample n.d.). The downloader object initializes update downloader. "Would you like to install updates now? (Y/N)" demonstrates strInput. The final function outputs the status / error during installation.

SOURCE CODE WITH SAMPLE OUTPUT RUNS….
‘courseProject.cmd
:: Run courseProject.vbs echo off
:start
cls echo Microsoft Updater echo. & echo. echo [1] Check for updates echo [x] Exit Program" echo. set /p choice="Enter 1 to check for updates or "x" to exit .... " if %choice% equ x exit if %choice% equ X exit cscript //nologo courseProject.vbs %choice% echo. pause goto start

‘courseProject.vbs
'ServerSelection values are delcared here ssDefault = 0 ssManagedServer = 1 ssWindowsUpdate = 2 ssOthers = 3

'InStr values intSearchStartChar = 1

dim strTitle 'declare the variables for storing the string titles of updates
Dim strFile, strText 'strFile variable is used to store the file name and strText is used to write the text into file

strFile = "updatelist.txt"

' Create the File System Object for creating a new file
Set objFSO = CreateObject("Scripting.FileSystemObject")

'Decision making statement to check whether the file has already been created.
If