Skip to Content
Microsoft® Windows® Scripting with WMI: Self-Paced Learning Guide
book

Microsoft® Windows® Scripting with WMI: Self-Paced Learning Guide

by Ed Wilson
October 2005
Beginner to intermediate
400 pages
12h 42m
English
Microsoft Press
Content preview from Microsoft® Windows® Scripting with WMI: Self-Paced Learning Guide
298 Part V: Security and Troubleshooting
tion, I do not supply the computer name in single quotes, but contain it in a variable called str-
Computer enclosed in double quotes. When I supply a computer name for the key name
property of Win32_ComputerSystem class, the computer name must be enclosed in single
quotes. To use a single variable for both of these instances that have different requirements, I
devised the simple FunFix function and included it at the bottom of the script. This function
takes the string that is supplied to it, appends a single quote as both a prefix and a suffix, and
assigns the resultant string to be equal to the function name. This enables dual use of the
same variable name.
RetrieveComputerSystem.vbs
strComputer ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Windows® Scripting Self-Paced Learning Guide

Microsoft® Windows® Scripting Self-Paced Learning Guide

Ed Wilson

Publisher Resources

ISBN: 0735622310Catalog PageErrata