Every time you reload the system, forget Redis and zookeeper boot up the way, to search the words and then to find what they want.
So write it down for the memo. Record the Windows system for the time being.
Win10 (Win7, remember to put the bat script in 1 directly into the Startup folder)
1. New bat script, start redis,zookeeper
2. New VBS script, call Bat script
3. Modify the registry, call the VBS script
Take Redis as an example:
1. New Bat Script
My Redis is installed in D:\redis, so create a new bat script file and put it in the following
D:
CD Redis
(Note here, if you have a multilevel directory, preferably a CD-level, so that no matter where the script file, you can do fault tolerance)
2. New VBS SCRIPT
CreateObject ("Wscript.Shell"). Run "cmd/c D:\redis\startRedis.bat", 0
3. Modify the Registration Form
Find HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
Right-click the new string value, fill in Openredis, and then change the value to just the VBS script path D:\redis\autoStartRedis.vbs
As shown in figure
At this point, the startup item can also be found in the Task Manager.
PS: Why do I have to pass the VBS script to relay it once? What about calling the bat file directly in the registry? Try it, you know.