Script Runtime: Acting on the file
VBScript is a scripting language derived from Visual Basic. Originally, the goal was to implement scripted commands for web pages. Some functions have been completely banished from the language, mainly all those related to the handling of files.
VBScript is a scripting language derived from Visual Basic. Originally, the goal was to implement scripted commands for web pages. Some functions have been completely banished from the language, mainly all those related to the handling of files. It would have been very unpleasant to have a language that allows a web page to delete your files via Default Functions of VBS.The purpose Script Runtime is to act on the file system. Here are the main features of Script Runtime:
• Find information on the file system (hard drives, files and
• Copy, move, delete files and directories.
• Create, read and write in the text files.
• Create dictionaries from text files.
• Encrypt your scripts.
Where will you find Script Runtime?
Script Runtime is a unique library (the famous dll - dll for Dynamic Linked Library): scrrun.dll.
It is considered as an object that can be instantiated through VBScript to enjoy its methods and properties. Since Windows 2000, it is an integral part of all systems. You can also implement it in the case where you install one of the following programs:
• Windows Script Host;
• Microsoft Office;
• Internet Explorer and so on.
A good number of Microsoft applications install this library. It is present on the majority of current systems.
What is included in Script Runtime?
Script Runtime offers three objects used in scripting :
• FileSystem Object : This object allows you to manipulate the file system of your system .It will allow you to act on files , directories and disks (information, creation, modification and deletion) .
• Dictionnary Object : This object allows you to create dictionaries. It allows us to create virtual inventories (in memory ) that we can use in a script. For example, generate a list of machines and perform an action for each of them , without having to create a text file.
• Script Object encode : As its name suggests, this object is used to encrypt a script, and to protect the contents from prying eyes. This object is not of a great need in the scripting infrastructure : It is used in the script in a web page . It is unfortunately very easy to decrypt an encrypted file via this system , but it can provide first-loss protection . We will discuss in the section on Script Runtime.