Running Batch File in background when windows boots up

前端 未结 5 1566
一整个雨季
一整个雨季 2020-12-02 13:58

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 re

5条回答
  •  误落风尘
    2020-12-02 14:14

    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
    

提交回复
热议问题