Running Batch File in background when windows boot

2019-01-10 13:20发布

How do I run a batch file each time windows boots up also I need to run it in the back ground(without that command window getting displayed)? I use Windows Xp. My actuall requirement is I want to start the Tracd server using the command line commands whenever Windows boots up.

6条回答
放荡不羁爱自由
2楼-- · 2019-01-10 13:25

Two other startup posibilties:

  • you could always add the bat file to the startup folder,
  • or start it as a Scheduled task setting to run on logon.
查看更多
地球回转人心会变
3楼-- · 2019-01-10 13:25

You can use autoexnt for this. It was original designed for windows NT, but is still working in newer versions of windows.

You have to download the Windows 2003 Resource Kit to get it.

查看更多
Bombasti
4楼-- · 2019-01-10 13:28

You can just use the start command.

Start google.com

This will open it in your default browser.

查看更多
孤傲高冷的网名
5楼-- · 2019-01-10 13:35

There's also hstart, a third party program that's worked well for my needs. It's maintained too. The last version was released on July 7, 2010.

查看更多
Juvenile、少年°
6楼-- · 2019-01-10 13:39

You can make an application run as a service.

Check this article for details:

查看更多
再贱就再见
7楼-- · 2019-01-10 13:45

Add your program in the registry:

Run - These are the most common startup locations for programs to install auto start from. By default these keys are not executed in Safe mode. If you prefix the value of these keys with an asterisk, *, is will run in Safe Mode. Registry Keys:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run registry key
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run registry key 

Then you can launch your batch in an invisible mode:

wscript.exe "C:\yourpath\invis.vbs" "your_file.bat"

In invis.vbs put...

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
查看更多
登录 后发表回答