The Core Technologies Blog

Professional Software for Windows Services / 24×7 Operation


AlwaysUp 14.5: Smarter Starts for OneDrive, Dropbox and More

AlwaysUp 14.5: Smarter Starts for OneDrive, Dropbox and More

We released AlwaysUp version 14.5 on May 12.

This significant update makes life easier for customers managing servers that run multiple copies of Dropbox, OneDrive and other applications. It also revises the shutdown logic for Dropbox, which now runs 7 or more instances of itself to implement file synchronization.

Let’s review the enhancements in detail.

On startup, AlwaysUp can now close your program in the Session or Account only

Some applications fail when you try to run multiple instances of them. For example, if you’re running a web server on a specific network port, starting a second copy will fail because the port is already in use.

For “single-instance” programs like that, you can instruct AlwaysUp to stop all running copies before it starts a new instance of your application. Clearing out those old processes will ensure that your application starts properly under AlwaysUp — automatically and without your intervention.

But while that capability is useful, we found it a bit overzealous in some circumstances. That’s because some applications (like OneDrive) allow you to run several instances in different accounts without issue. For those apps, AlwaysUp can start its own copy without any interference from the other copies already running. That is, AlwaysUp does not need to stop all the other running copies.

To accommodate those applications, AlwaysUp 14.5 introduces a new option to only stop the processes running in the same Windows session or account. It’s available under the “stop copies” setting on the Startup tab when adding or editing your application:

Only stop copies in the same Windows session or account

When to stop your application in the session or account only

Let’s illustrate the power of the new option with an example.

Suppose you manage a Windows Server machine. You’ve installed OneDrive as a Windows Service with AlwaysUp and it’s using Bob’s Windows account (on the Logon tab). It’s not yet running though.

Alice logs in to the server via remote desktop. As she does so, Windows launches OneDrive automatically on her desktop.

Next, you log in to the server to start the OneDrive entry in AlwaysUp. Here’s where the new option makes a difference.

In previous versions of AlwaysUp, Alice’s copy of OneDrive would be terminated when you start the OneDrive service. Indeed, AlwaysUp would stop all copies of OneDrive running on the server, regardless of where they’re running.

However, with the new option that only stops copies of OneDrive in the same session or account, Alice’s OneDrive will not be terminated. That’s because AlwaysUp runs OneDrive in a different user account (Bob’s) and in a different session (Session 0). As a result, Alice’s OneDrive will not be affected by the instance of OneDrive started by AlwaysUp.

Note that the new option only makes sense for applications that support running multiple instances in different sessions. If only a single instance of your application must run across all sessions and accounts, you should not check the box.

Updates for OneDrive and Dropbox Windows Services

Going forward, the Application Advisor will install Dropbox and OneDrive with the stop-copies setting restricted to the session or account.

And if you’ve already installed Dropbox or OneDrive and would like to take advantage of the new setting, simply edit your application in AlwaysUp and check the box on the Startup tab.

Smoother termination of 7+ Dropbox processes

These days, a single run of Dropbox can spawn many copies of Dropbox.exe. You can see the plethora of processes in Microsoft’s Process Explorer:

Dropbox runs 7 instances of itself

Earlier versions of AlwaysUp were optimized for the good old days — when Dropbox launched only 3 copies of itself. Now AlwaysUp 14.5 works with the latest 7-process arrangement — and goes beyond that to prepare for a world where Dropbox launches to 9, 13 or even more executables.

Other fixes & improvements

  • Fixed a handful of long-running issues with non-ASCII service names throughout the program. Even though few customers noticed the problems, they were very annoying (the problems not the customers).

  • Added the ability to remove the registration code, to return AlwaysUp to the unregistered state. This is helpful when you’ve upgraded and want to apply your new license.

  • Fixed an issue where the registration window could be “cut off” on high-resolution, 4K screens. Another annoyance resolved!

As usual, please check out the release notes for the full list of features, fixes and improvements included in AlwaysUp version 14.5.

Upgrading to AlwaysUp 14.5

If you purchased AlwaysUp version 13 (after October 2021), you can upgrade to version 14.5 for free. Simply download and install “over the top” to preserve your existing applications and all settings. Your registration code will continue to work as well.

If you bought AlwaysUp version 12 or earlier (before October 2021), you will need to upgrade to use version 14.5. Consequently, please buy upgrades here — at a 50% discount.

See the complete upgrade policy for more details.

Thank you for reading!

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

Q&A: Can AlwaysUp Trigger a Daily Import into my WooCommerce Site?

Can AlwaysUp Trigger a Daily Import into my WooCommerce Site?
  We’re using WP All Import to import a CSV file into a WooCommerce site.

Can I use AlwaysUp to set up a nightly task that triggers WP All Import to perform the import, as described in this article?

Our site is running on Linux but our VPS provider doesn’t allow us to add a “cron job” to the machine and I’m hoping that AlwaysUp can help. We already use it for a couple of older Windows programs.

— Patrick S.

Hi Patrick, thanks for reaching out. And thanks for being a customer!

Yes, AlwaysUp can help definitely run your nightly task.

Basically, you should create batch files that import the data and then instruct AlwaysUp to kick off the batch files at scheduled times.

Let’s go through the process, step by step.

1. Create the “trigger” and “processing” batch files

Follow the instructions in the article you sent to create a couple of batch files.

The first batch file imports the data. It will run nightly, at a time of your choosing. Let’s call it the “trigger batch file”.

The second ensures that all data previously imported is fully processed, so we call it the “processing batch file”. It will run every couple of minutes.

Both scripts work by calling a special URL on your WooCommerce site. We recommend using the free cURL command line utility to help with that.

For example, the trigger batch file should contain a single line:

C:\apps\curl\curl.exe http://YOUR-WEBSITE.com/wp-load.php?import_key=[YOUR_SECRET_KEY]&import_id=[YOUR_IMPORT_ID]&action=trigger

And the processing batch file will be very similar (notice the small variation in the URL parameter):

C:\apps\curl\curl.exe http://YOUR-WEBSITE.com/wp-load.php?import_key=[YOUR_SECRET_KEY]&import_id=[YOUR_IMPORT_ID]&action=processing

Note that the path to curl.exe will be different on your system. Be sure to specify the correct path in your files and save them to a well-known location.

Our next job is to plug those files into AlwaysUp. Let’s start with the trigger batch file.

2. Add the trigger batch file to AlwaysUp

To have AlwaysUp run the trigger batch file every night:

  1. Start AlwaysUp

  2. Select Application > Add to open the Add Application window

  3. In the Application field, enter the full path to the trigger batch file

  4. In the Name field, enter a suitable name (we called ours “Trigger Import”)

    Trigger Import: General tab
  5. Switch to the Logon tab. Check the box at the top and enter your Windows username and password:

    Trigger Import: Logon tab
  6. Switch to the Restart tab. Here’s where you will set the batch file to run nightly.

  7. Specify the time to run, ensure that the first run happens at the set time and minimize logging, as pictured:

    Trigger Import: Restart tab
  8. Click the Save button to record your new task.

  9. And finally, select Application > Start to launch the nightly process.

2. Add the processing batch file to AlwaysUp

To install the processing batch file, follow the same steps you took to setup the trigger batch file. Other than the obvious variations — such as the name and the path to the batch file — specify a two minute interval as pictured here:

Process Data: Restart tab

AlwaysUp will run both batch files on your WooCommerce site as specified

With your two periodic tasks installed and managed by AlwaysUp, WP All Import will download your CSV file and update, delete, and create posts on your site according to your settings — every night.

Best of luck with your WooCommerce site!

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

Q&A: Does AlwaysUp Support Dropbox Selective Sync?

Does AlwaysUp Support Dropbox Selective Sync?
  I’m considering using your AlwaysUp app to start Dropbox automatically.

I understand that AlwaysUp doesn’t work with Smart Sync but does it work with Selective Sync? How does that function?

We only want to have half of our Dropbox folders syncing.

— Adam

Hi Adam.

To answer your question, AlwaysUp works well with Dropbox Selective Sync.

Indeed, we have many customers using that feature. And our test installations on Windows 11, 10 and Server 2022 all rely on Selective Sync to block out huge files.

Note that when you use Selective Sync, your PC won’t have access to the files and folders you’ve excluded. But that’s exactly what you want, right?

Anyway, let’s dig into the details.

What is Dropbox Selective Sync?

Selective Sync allows Dropbox a user to avoid downloading all files from Dropbox.com onto their PC.

You can find Selective Sync in the Preferences window (available from the Dropbox tray icon):

Dropbox Selective Sync: Preferences

Click the Select folders button and choose the directories to be downloaded from the cloud:

Dropbox Selective Sync: Choose Folders

And once you’ve made your selection, Dropbox will respect it. Any folder you un-checked will not show up on your PC.

It’s easy to see that you can use Selective Sync to moderate how much hard drive space Dropbox consumes. For example, if you have a huge folder of videos that you never intend to play on your computer, simply un-check the folder in Selective Sync to avoid the videos wasting precious gigabytes on your hard drive.

Very straightforward.

So that’s Selective Sync. To avoid confusion, let’s briefly touch on the other space-saving feature with a similar name.

How is Selective Sync different from Smart Sync?

Dropbox Plus and Professional customers who don’t want to download every file from the cloud can also use Smart Sync.

With Smart Sync active, Dropbox delays downloading each file to your computer until you need it. The effect is that a file takes up practically no space at all until you first access it.

The effect is very similar to Selective Sync: some files are not downloaded to your computer, thereby saving hard drive space. However, there is one key difference:

  • With Selective Sync, only nominated folders and files appear on your hard drive.

  • With Smart Sync, all folders and files show up on your hard drive.

So Smart Sync seems like an easy way to minimize space while keeping all files accessible. But unfortunately that’s not the end of the story…

Why Selective Sync works with AlwaysUp (while Smart Sync does not)

As you pointed out, Dropbox Smart Sync doesn’t work with AlwaysUp. Unfortunately the magic that supports the delayed downloading of files on your hard drive doesn’t function when it’s run in the context of a Windows Service.

However, because Selective Sync simply omits the file you explicitly ruled out, it doesn’t fall victim to the same problem. Without delayed downloading, Dropbox works perfectly fine as a Windows Service with AlwaysUp.

You shouldn’t have any problems at all using Selective Sync.

Enjoy!

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

Service Protector 9.0: Easily Import Many Windows Services

Service Protector 8.5: New Sanity Check, Windows 10, 11 22H2 Compatibility

Service Protector 9.0 is now available for download. Here’s what’s new in this version:

Moving to another computer? Easily import protectors “in bulk” — instead of one at a time

The best way to copy (or move) a Service Protector configuration to a different computer is to:

  1. Export the protector to an XML file from the existing installation, and then

  2. Import the XML file to create a new protector in your new installation.

This works fine if you’re protecting one or two services, but importing files one by one creates significant overhead if you have 20+ services to restore!

The new “bulk import” capability aims to reduce that overhead. With the new feature, you simply select the files you wish to import and walk through the step-by step wizard to protect the same services on your new computer.

Here’s a brief overview of the new import process:

  1. Choose Import from the Protector menu:

    Select Protector Import
  2. Select the files that you exported from your other installation of Service Protector.

  3. Service Protector will start processing your files:

    Import Protectors: Validating
  4. From there, follow the self-explanatory prompts to create protectors for all the files you selected.

Note that as part of the import process, Service Protector may ask you to resolve conflicts.

For example, you may have to choose a new service if the one in the XML file is already protected:

Import Protectors: Duplicate name error

Click Edit & Fix and select a different Windows Service from the list.

Or if a protector is configured to send email but the XML file doesn’t contain the password for your email account, you will be prompted to add it:

Import Protectors: No email password error

Click Edit & Fix and move to the Email tab to enter your password.

As you can see, the new feature is very easy to use. We hope that it will be a time-saver for our customers working with many Windows Services.

Other improvements

  • Improved the handling of non-English text throughout the application, including when sending email and reporting activity.

  • Service Protector will now log an entry to the Event Viewer whenever Windows starts a protector at boot. That makes it easy to identify when protection was started manually (by a person or process) versus automatically after a reboot.

  • To help customers who buy upgrades, we added the ability to remove the software’s registration code. Doing so will return Service Protector to the unregistered state and give you the opportunity to enter a new registration code.

  • Fixed an issue with the registration window being “cut off” on high-resolution, 4K screens.

  • The “About” window now mentions the major version number licensed.

As usual, please review the release notes for the full list of features, fixes and improvements included in Service Protector version 9.0.

Upgrading to Service Protector 9.0

If you purchased Service Protector version 8 (after November 2021), you can upgrade to version 9 for free. Simply download and install over your existing installation to preserve your existing services and all settings. That way, your registration code will continue to work.

If you bought Service Protector 7 or earlier (before November 2021), you will need to upgrade to use version 9.

Please buy upgrades here — at a 50% discount.

See the complete upgrade policy for more details.

Enjoy!

Posted in Service Protector | Tagged , , | Leave a comment

OneDrive Version 23.48: Trouble Running in Session 0 [RESOLVED]

OneDrive Version 23.48: Trouble Running in Session 0

This week, several AlwaysUp customers reported that OneDrive suddenly stopped copying their files. It seems that the trouble began after OneDrive automatically updated itself to version 23.048.0305.0002, which Microsoft started pushing to everyone on March 21st.

Needless to say, we’re actively investigating. Here’s what we’ve learned so far:

  1. For some customers, OneDrive fails to synchronize any files when AlwaysUp runs it in the background in Session 0. The OneDrive executable actually starts normally and keeps running — it just doesn’t do its job.

  2. Not all customers are impacted. Many AlwaysUp installations continue to sync files happily, with the latest version of OneDrive starting at boot in Session 0.

  3. OneDrive is completely fine when it’s started in the interactive session from AlwaysUp — by selecting “Start OneDrive in this session” from the “Application” menu. The fault only appears in Session 0.

  4. Our development team hasn’t been able to reproduce the problem. OneDrive 23.048 works flawlessly on all our Windows 10, 11 and Windows server 2022 computers.

    For example, here is a look at OneDrive passing all our file synchronization tests:

    OneDrive 23.48 working in Session 0 on Windows Server 2022

Temporary solutions

Until we get to the bottom of the problem, please run OneDrive normally on the desktop. Of course, you will have to stay logged in to your computer (which we know is less than ideal).

Another option is to roll back to a previous version of OneDrive that works in Session 0. You can download old versions from the release notes page. If you go that route, you will probably have to uninstall your current OneDrive before installing the old version. Also, you will need to disable automatic updates or else OneDrive will soon reinstall the faulty version.

Trouble running OneDrive with AlwaysUp?

If you’re suddenly having problems running OneDrive with AlwaysUp, be sure to get in touch. Please let us know:

  1. The version of Windows your computer’s running

  2. The version of OneDrive installed (click the OneDrive tray icon; select the gear in the upper left; choose “Settings”; go to the “About” tab)

  3. When you think your problems started

We’ll review your situation and do our best to help.

Hopefully Microsoft will soon fix the problem that surfaced in OneDrive version 23.048.0305.0002. In any case, we’ll keep pushing for our own solution too. Fingers crossed!


March 25 2023: Update

  1. The problem seems to occur on Windows Server 2019 and 2022. All the reports we’ve received have been from customers running those operating systems. However, some customers running 2019 and 2022 are fine! Perhaps it’s related to recent Windows updates?

    In any case, if you’re seeing the problem on Windows 10 or 11, please let us know.

  2. We’ve confirmed that the issue is not unique to AlwaysUp — it’s a problem running OneDrive in the context of a Windows Service in Session 0.

    Indeed, we tried many similar tools (including Microsoft’s PsExec) and none were able to launch OneDrive in the background. Most times OneDrive quickly crashed with a strange exception hinting that user interface elements may be involved in the drama:

    Faulting application name: OneDrive.exe, version: 23.48.305.2, time stamp: 0x454d6e69
    Faulting module name: Windows.UI.Xaml.dll, version: 10.0.22621.1344, time stamp: 0x95ad35df
    Exception code: 0xc000027b
    Fault offset: 0x00000000008704e0
    Faulting process id: 0x0x23D0
    Faulting application start time: 0x0x1D95F784F0ABAC4
    Faulting application path: C:\Program Files\Microsoft OneDrive\OneDrive.exe
    Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll
    Report Id: a47c6cb6-66fc-4244-81b5-94df6437460c
    Faulting package full name:
    Faulting package-relative application ID:
  3. Since the trouble is in Session 0, one solution is to setup automatic logon and have AlwaysUp launch OneDrive in the auto-logon session. That way OneDrive will start automatically after a reboot.

    The autologon approach is described here in our FAQ. Again, it’s less than ideal to have a user logged on but it may be OK for a while. Note that you can lock the screen automatically after login if that helps.

  4. Special thanks to Perry Nelson for providing us with a Server 2022 machine that exhibits the issue. That has been super helpful as we’ve still not been able to reproduce the failure on our 2019 and 2022 test servers.


April 2 2023: Update

  1. Unfortunately the latest pre-release version of OneDrive (23.066.0326.0005, released on April 1) still fails to copy files when run in Session 0. With an abundance of optimism, we’ll continue to test Insider builds as they become available. The best fix will come from the OneDrive developers themselves.

  2. So far we’ve only had one report of trouble on Windows 11 — but that turned out to be a false alarm. All other reports have been on Windows Server.

    Curiously, our Windows Server 2019 and 2022 machines (with all required & recommended patches applied) continue to work flawlessly. We have no idea why.

  3. We’ve asked for help on Microsoft’s OneDrive forum. Hopefully some kind and knowledgeable soul will provide insight soon.

  4. Do you have a support contract with Microsoft? If so, can you please try to get them to look into what changed in OneDrive? Perhaps they will move quickly for a paying customer.


April 12 2023: Update

  1. We’ve heard from several customers that the latest Insider/pre-release builds of OneDrive work properly in Session 0. Most folks reported success after version 23.071.0402.0001, which was released on April 7.

  2. Indeed, our team was able to confirm OneDrive version 23.073.0404.0001 (April 10) working in Session 0 “with our own eyes”. Thanks again to Perry Nelson for his generosity in making a system available for testing.

  3. Unfortunately we have no idea how long it will take for Microsoft to move the fix through the delivery pipeline and into a production release. Until then, we recommend that you manually install OneDrive version 23.073.0404.0001 or later.

Thanks to everyone for their patience and support throughout this drama! Apparently our little solution to the real-world problem of running OneDrive unattended lives to fight another day. 🙂

Posted in AlwaysUp | Tagged , , , | 21 Comments