Http://blog.csdn.net/jinghaianlangethis blog has a considerable number of vbs and WMI learning guides. Very good.
In msdn this URL has a lot of WMI learning materials: http://msdn.microsoft.com/zh-cn/library/ms974579.aspx
Reprinted from: http://blog.csdn.net/jinghaianlange/archive/2007/07/16/1693645.aspx
In Windows, it may be easy to learn computer operations, but many computers work repeatedly. For example, you may need to copy, paste, rename, and delete some computer files every week, maybe the first thing you do to start a computer every day is to open Word, switch to your favorite Input Method for text editing, and play beautiful music to create a comfortable environment for your work, of course, you may also need to sort out some data in the text, arrange all kinds of data according to certain rules ....... These things are repetitive and trivial, making people easy to get tired.
Third-party software may be able to enhance certain computer functions, but it is often more than half the effort to solve these repetitive tasks. I have also tried to write in computer languages.ProgramTo solve these problems, but the following commands, syntax,AlgorithmSystem frameworks and class libraries often make me feel that this is necessary. Is it because pig hair is hard to be pulled out, so I have to learn how to design a Pig Hair Removal Machine for myself (?) ?
Vbs is a Windows Script. Its full name is Microsoft Visual BASIC script Editon. (Microsoft Visual BASIC script version), vbs is an abstract subset of Visual Basic and is built in the system. It is used to compile scripts.CodeIt cannot be compiled into a binary file, which is directly executed by the Windows System (actually an explanation called host ).Source codeAnd execution), efficient and easy to learn, but most of the tasks that can be done in advanced languages are basically available, and it can automate various tasks, it can free you from repetitive and trivial work and greatly improve your work efficiency.
I personally think vbs scripts are actually a computer.Programming LanguageHowever, due to the lack of some elements in the computer programming language, the ability to describe events is weak, so it is called a script. The most convenient part of it is to provide simple support for COM objects. So what is a COM object?
In this way, COM objects are program modules with specific function functions. They generally use OCX or dll as the extension. You only need to find the module files that contain the functions you need, and standard references in the script can implement specific functions. That is to say, the vbs script calls a ready-made "control" as an object and uses the attributes and methods of the object to achieve the purpose, it eliminates the trouble of coding, designing algorithms, and so on. To put it bluntly, I don't think it's troublesome to pull pig hair? I found that xx machine (such as a vacuum centrifuge) has a function to achieve hair removal. OK, I will take it to pigs for hair removal. What? Is it easy to use? A waste of resources? Oh, my God, it's a computer chip thing. It's easy and quick for me to solve the problem.
The most convenient thing is that it does not even require a special development environment. In your computer, you can write vbs scripts as long as you have notepad, And you can execute them directly.
After learning the vbs syntax, How can I check the functions or methods that vbs can use? Http://www.w3school.com.cn/vbscript/vbscript_ref_functions.asp
This website provides these functions and methods for query during use