Redis hidden command-line window starts automatically under Windows

Source: Internet
Author: User

This period of time looked at the relevant content about Redis, and I didn't say much about Redis installation and general startup under Windows. You can refer to other blog http://www.cnblogs.com/edisonchou/p/3821228.html. I followed this blog to add the Windows service that started Redis, but when I started the service, I got an error: 1053: The service did not respond to the start or control request in a timely manner. Such as:

I checked the relevant information, some people said it was because of WINDOWS8 system permissions. I just wondered if I could get around this error and implement the automatic start of Redis without having to start on the command line.

One, I write the start command to bat. As follows:

F:\redis\workspace\redis-server.exe F:\redis\workspace\redis.conf

Save As Createredis.bat

Second, use VBS to invoke bat.

New VBS file OPENREDIS.VBS. Write command:

CreateObject ("wscript.shell""cmd/c F:\redis\workspace\createredis.bat  ",0

Here's how to call VBS.

Method One: The program is called, the code is as follows:

New"wscript.exe""f:\\redis\\workspace\\ Openredis.vbs"; Process.Start (startinfo);

Method Two: Set the boot to start automatically.

In the registry key value

"HKEY_CURRENT_USER \software \microsoft \ Windows \CurrentVersion \run" creates a new string value Openredis, such as adding a VBS path, enabling the boot to automatically start Redis.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.