
VBScript examples still appear in old Windows administration notes. Treat them as legacy references, not a reason to enable a scripting feature on a computer that does not need it.
A small example with a clear stop#
Option Explicit
Dim name
name = InputBox("What name should the message use?")
If Len(name) > 0 Then
MsgBox "Hello, " & name
End IfThis example requests a value, shows one message if it is nonempty, then exits. It does not open programs, loop through popups or modify files. It is illustrative source, not a command this website runs.
Do not confuse a prompt with protection#
A password written inside a readable script does not protect a resource. Anyone who can read or edit the file can inspect or change the comparison. An endless popup loop is also a poor demonstration: it teaches no useful stop or error path.
Microsoft has published a VBScript deprecation plan. Availability depends on the Windows release and configuration. For new automation, assess the maintained tools available in that environment rather than turning a retired tutorial into an installation requirement.


