Script to be executed after program startup

Today, due to the implementation needs, a device is connected to the Internet through broadband certification, and our program is placed in the startup item, so when the program starts, the broadband has not been connected to the network. service error;

After Baidu, the following bat file code has been tested, and the use is simple and efficient:

@echo off
ping 127.0.0.1 -n 60 >nul
start cmd /k "C:\Users\lenovo\Desktop\TeamViewer.exe"

The above code 60 means 60 seconds, the content in the quotation marks "" is the path of the delayed execution file, pay attention to the spaces;

After the copy modification is completed, save it as a bat file, and you can run the test directly;

If the operation is successful, put the bat file in the system startup item;

It perfectly solves the need for delayed program start-up.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324973340&siteId=291194637