The Core Technologies Blog

Professional Software for Windows Services / 24×7 Operation


Q&A: How do I Launch a Service after AlwaysUp Starts my Application?

How do I Launch a Service after AlwaysUp Starts Google Drive
   I’m interested in purchasing your AlwaysUp application but would like some further information first if you don’t mind.

My main goal is to run Google Drive for desktop as a service. But there is an existing Windows Service that I need to run after Google Drive has launched. Is it possible to use AlwaysUp to start it after Google Drive has started?

— Shaheed

Hi Shaheed, thanks for trying AlwaysUp.

The answer to your question is yes. Please follow these steps to setup Google Drive and your other service in AlwaysUp.

1. Install Google Drive as a service with AlwaysUp

As described in our step-by-step tutorial, the new AlwaysUp Application Advisor supports Google Drive for desktop:

Application Advisor supports Google Drive for desktop

Instead of leaving you to figure out and apply the best settings to support background file synchronization, simply click through the Advisor’s straightforward prompts to create your Google Drive service — in less than 2 minutes.

At the end of the process, your Google Drive for desktop will be installed as a 24/7 Windows Service. Afterwards, test and make sure that the new service syncs your files as expected.

2. Have AlwaysUp start the other service after it runs Google Drive

Now that Google Drive is set up, let’s turn our attention to starting the other service at the right time.

Please:

  1. Edit your Google Drive for desktop entry in AlwaysUp.

  2. Move to the Automate tab.

  3. Check the When the application starts… box at the top.

  4. Enter the following command (which will start your service):

    C:\Windows\System32\net.exe START "<Service-Name>"

    where <Service-Name> is the name of your service. Note that the quotes around the name are required if it contains a space.

  5. In the Every section, specify when the service should be started.

  6. Check the Only option and set the value to 1 (because we only need to start the service once).

  7. Finally, save your settings.

For example, if you want to start the Print Spooler service (named “Spooler”) 30 seconds after Google Drive starts, your Automate tab should look like this:

Use AlwaysUp to automate NET START

3. Change your service to start manually

Is Windows starting your service when the computer boots? If so, you may want to change that because with step 2 in place, AlwaysUp will start the service when it’s needed.

To prevent Windows from starting your service at boot:

  1. Start the Services application (run “services.msc” to launch it)

  2. Scroll the list to find your service.

  3. Double-click the entry to bring up the service’s properties.

  4. In the Startup type field, select Manual. It should look like this:

    Set the service's startup type to Manual
  5. Save your changes.

And that’s it!

Next time your computer boots:

  1. Windows will automatically start AlwaysUp

  2. AlwaysUp will start Google Drive

  3. And after a few seconds/minutes (whichever you specified), AlwaysUp will start your service.

All the best.

Posted in AlwaysUp | Tagged , , , , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *