C:\Program Files
and the script's output file is stored by
default in the directory from which the script is run, but the user's account
did not have permission to write to that directory.
I could have run the script from an administrator account or moved it to a folder to which the user had write permission, but I decided I would, instead, add code to the script to allow the user to select the directory in which the output file will be placed. I added the capability for the user to select the folder where the output file will be stored using the BrowseFolder Function provided by Rob van der Woude at Browse Folder Dialog.
When the script is run, it will prompt for the IP address of name of the computer to be queried. If none is entered, the list of installed programs will be determined from the Windows registry on the computer on which the script is being run. The registry query will return version and installation dates and times for installed programs as well as their names.
The script will next prompt the user to browse for the folder where the comma-separated values output file will be stored.
Once the output directory has been selected, the script will create the output file in that directory with a name that consists of the system name followed by an underline, then the date in mmddyyyy (month-date-year) format, then another underscore followed by the time in 24-hour clock time, aka "military time, another underscore and then "Software.txt". E.g., THELMA-LOU_01072016_220841_ Software.txt for a file produced when the program was run on a system named Thema-Lou on January 7, 2016 at 10:08:41 PM.
If the user clicks on "Yes" when asked "Do you want to view the results now?", the results will be displayed in the default text editor for the system.
Download
List_Installed_Programs.vbs ( zip file )
Created: Friday January 7, 2016