Software recommendation: simple command to achieve personalized pop-up windows

If you want to implement an automatic message reminder after Windows starts, there are many ways to achieve it. For example, putting a TXT file written in Notepad into the startup folder to start automatically with the system; or using special software such as Desktop Wizard to remind, etc. But what if you want to implement automatic pop-ups with date, time or even custom content for the title bar and special selection buttons? In fact, with a simple system command, you can create a personalized window that pops up automatically with system startup.

The principle of personalized pop-up window is very simple, the general idea is: use Notepad to write a pop-up information display command consisting of Msgbox function, then save this file as a Windows can directly run . Finally, use the shell:startup command to open the system startup folder and put this applet file into the folder to realize the automatic invocation of this file when Windows starts. We will explain the implementation process below.

1. One command to create a simple pop-up program

We want to build a prompt window using a command of the following format.

X=Msgbox(“MY_MESSAGE”,number_of_buttons, “TITLE”)

For the sake of visualization, we will not explain the parameters of the command, but use a specific example to illustrate it by operation.

Open the Notepad tool and write the following line of code (Figure 1).

X=Msgbox(“Your turn on duty today, have you checked all the equipment?” ,64,FormatDateTime(Now, vbLongDate))


After you finish typing, click “File→Save” command in the Notepad window, and in the subsequent save file window, select the save type as “All files (*. *)”, name the file (such as “TiShi.vbs”), note that the extension must be .vbs, and the file type must not follow the default TXT type, otherwise it will not work (Figure 2).


Thus, the required pop-up program is built. The following is a specific explanation of several parameters used in the above command, in order to achieve a more flexible use.

In the above command, “MY_MESSAGE” indicates the content to be reminded, which should be replaced with your own personalized content, such as “Are you on duty today, have you checked all the equipment? . Note that the quotation marks on both sides of the content must be double quotation marks, otherwise there will be a syntax error.

The num_of_buttons parameter in the command indicates the button type code that appears in the prompt window. There are 11 types of buttons to choose from, and each type corresponds to a code. The specific meanings are shown in Table 1 (Table 1).


In this example we have used the code 64 and the resulting window is a reminder window with an i message icon. If the different codes mentioned above are replaced in the named lines, different styles of reminder windows can be obtained. The window styles corresponding to the various codes in the table are shown in the figure (Figure 3).


The “TITLE” parameter means the title line of the prompt window. It can be quoted with half-quotes or a function. In the case of half-quotes, the contents can include any prompt text, such as “Today’s Important Events” or “Please Note”, etc., which can be customized by the user. If you want to display the current date and time in the title line, you need to use the FormatDateTime function instead, and then note that you can not add quotation marks. The specific functions that can be used here and their meanings are listed below (Table 2).


Replace the “TITLE” title parameter in the command line with a different time function in the table to obtain a different style of time title bar (Figure 4).


If you replace the function with user-defined text, then the title bar will display the user-defined text instead of the time information. For example, to make the title bar display “This is a very important duty day”, replace “TITLE” with “This is a very important duty day”, and the command line will be “X=Msgbox(“Today is your shift, have you checked all the equipment?” 64, “This is a very important duty day”)”, then the window will be displayed in the style shown in the figure (Figure 5).


2. Add the pop-up program to the self-start list

Finally, we need to port the TiShi.vbs program we created above to the system startup folder. Press Win+R to launch the “Run” dialog box, type “shell:startup” in the dialog box and press Enter (Figure 6).


Then automatically open the Windows 10 self-starting program folder and copy the TiShi.vbs program we created above to that folder (Figure 7). This way, the next time you boot your system, you will see the prompt window.


Tip: If you want to change the content of the prompt message window and the title bar, just right-click on the vbs program and choose to open it with Notepad, refer to the table above and modify the content or code of the two parameters.

Leave a Comment