Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Azure Storage Emulator as service

We use Azure Storage Emulator on the development machines and the CI server to be able to use storage queues locally. Now every time I sign out of Windows or reboot, I need to start the storage emulator manually.

Is there a way to start the Azure storage emulator as service, so that it automatically starts when Windows does?

like image 399
theDmi Avatar asked Dec 01 '15 06:12

theDmi


2 Answers

Updated answer after trying out options from Gaurav Mantris answer

Running the batch file as described by Gaurav Mantri keeps the command window open. Here is a way to avoid that:

  • Open Task Scheduler
  • Create a new task
  • Add the "At log on" trigger
  • Add a "Start a program" action with the following settings:
    • Program/Script: AzureStorageEmulator.exe
    • Add arguments: start
    • Start in: C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator (or wherever the storage emulator resides on your disk)
like image 106
theDmi Avatar answered Oct 17 '22 00:10

theDmi


Storage Emulator files can be found in C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator. I noticed a batch file in there called StartStorageEmulator.cmd.

What you could is create a shortcut of this file in your Startup folder (e.g. C:\Users\<your user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup). Then when you login back again, the storage emulator will start automatically. [Please see instructions here: http://www.tech-recipes.com/rx/28206/windows-8-how-to-add-applications-startup-folder/].

Other alternative is to create a new task that runs this batch file and schedule that task to run when computer starts. Please see this thread for more details: Run Batch File On Start-up.

like image 22
Gaurav Mantri Avatar answered Oct 17 '22 00:10

Gaurav Mantri