Tag Archives: Windows Tutorial

Windows Tutorial for operating systems are particularly common on personal computers and servers.

Visual Basic Script Windows Logon with Message-Box

Visual Basic Script Message-Box Pop-up Window

Visual Basic Script Message-Box, MsgBox Logon Message

Server administrators have the ability to send message to users to inform them when they log on to the workplace.

VBScript Message-Box (MsgBox) Logon

The Visual Basic Script Message-Box (MsgBox) function is excellent for this purpose. Insert the following 3 lines into an editor (Notepad) and save them as i.e. “logon.bat”.

echo msgbox("Good morning staff. we serve coffee or tea in the lounge bar. Thank you and a nice day!"),vbInformation ,"Message"> %temp%\msg.vbs
%temp%\msg.vbs
erase %temp%\msg.vbs

This VB-Script creates a pop-up window with information through the MsgBox function. The msg.vbs file is saved under %temp% and erase them after execution.

The user can close the opened window by clicking OK.

User Logon script (dsa.msc)

In the AD user administration (dsa.msc) for the corresponding users, enter the file name in the Profile tab at Logon script (logon.bat).

For Windows domain, save the file to \\server\netlogon.

  The netlogon share is located on the server at %systemroot%\SYSVOL\sysvol\[domain]\scripts. If a logon script is already in use, the code lines can be inserted into this script.

Microsoft Visual Basic Scripting Edition

VBScript (“Microsoft Visual Basic Scripting Edition”) is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers without error handling and with subroutines and other advanced programming constructs. It can give the user complete control over many aspects of their computing environment.

VBScript uses the Component Object Model to access elements of the environment within which it is running. For example, the FileSystemObject (FSO) is used to create, read, update and delete files. VBScript has been installed by default in every desktop release of Microsoft Windows since Windows 98. In Windows Server since Windows NT 4.0 Option Pack; and optionally with Windows CE (depending on the device it is installed on).

A VBScript script must be executed within a host environment, of which there are several provided with Microsoft Windows, including: Windows Script Host (WSH), Internet Explorer (IE), and Internet Information Services (IIS). Additionally, the VBScript hosting environment is embeddable in other programs, through technologies such as the Microsoft Script Control (msscript.ocx).

Open Command Prompt Here

How to open command prompt here from selected folder

After opening the command prompt, you usually have to type the path to the folder with “cd” followed by the directory path. However, there is the possibility to open the command prompt in a certain folder, to do this you go to the desired directory in Windows Explorer, and then type “cmd” in the address bar and press the Enter key.

The Command Prompt opens in the selected directory path.

If the command prompt is used more often, the PowerShell enabled as the default can be replaced. To do this, go to the settings, under Personalization – Taskbar. Replace Command Prompt with Windows PowerShell in the menu when I right-click the start button or press Windows key+X. Here switch to Off.

This means that with Windows+X instead of the default of PowerShell, the command prompt now appears.

Open Command Prompt here from selected folder on Windows 11

On Windows 11 it is more easy, in windows explorer press Shift+F10 the context menu opens with the command prompt, which opens in the selected directory.

Command Prompt operation

cmd.exe interacts with the user through a command-line interface. On Windows, this interface is implemented through the Win32 console. With cmd.exe may take advantage of features available to native programs of its own platform. For example. Windows it can use real pipes in command pipelines, allowing both sides of the pipeline to run concurrently. As a result, it is possible to redirect the standard error stream. (COMMAND.COM uses temporary files, and runs the two sides serially, one after the other.)

Multiple commands can be processed in a single command line using the command separator &&.

When using this separator in the Windows cmd.exe, each command must complete successfully for the following commands to execute. For example:

C:>Command1 && Command2 && Command3

In the above example, Command B will only execute if Command A completes successfully. The execution of Command C depends on the successful completion of Command B. To process subsequent commands even if the previous command produces an error, the command separator & should be used. For example:

C:>Command1 & Command2 & Command3