The Core Technologies Blog

Professional Software for Windows Services / 24×7 Operation


Q & A: Can my CAE/Visio Application Run Properly as a Windows Service?

Q & A - Computer Aided Engineering Application
  I must run a Computer Aided Engineering (CAE) application as a service but it doesn’t work with AlwaysUp. I guess that Visio is the problem because the startup phase of the tool runs up to the Visio initialization (via COM) and then hangs. When I try to register Visio standalone, it’s also not working.

Any idea what I can do to isolate the problem?

— Rüdiger Lange, AUCOTEC

Hi Rüdiger. You are likely running into a couple of problems. Here are our recommendations to resolve the issues:

Specify the correct Windows account in AlwaysUp

Your CAE application needs to run in the Windows account where Visio was installed. If not, your tool will fail when it tries to start Visio.

You see, when you installed and configured Visio, it saved several settings in your account. Those settings are not accessible to other users of the computer.

Even if another user found and launched the Visio executable, Visio would start, but it may come up “blank”. Whatever settings you provided at installation (and any changes you subsequently made while using Visio) may not be visible.

So please enter the user name and password of your Visio Windows account on the Logon tab to have AlwaysUp start your CAE application in that account. For example, here we have configured the “Administrator” account:

Specify the account for Visio

Start Visio as a Windows Service too

AlwaysUp will run your CAE application in the background, in the isolated Session 0. Now because COM components cannot communicate easily across login sessions, Visio must run in the same session. Therefore, you should also launch Visio as a Windows Service with AlwaysUp.

We don’t have a tutorial for Visio but setup should be the same as for any application in the Microsoft Office suite. Here are the guides for:

But please be aware of the following cautionary note from Microsoft for when running an Office program as a Windows Service:

All current versions of Microsoft Office were designed, tested, and configured to run as end-user products on a client workstation. They assume an interactive desktop and user profile. They do not provide the level of reentrancy or security that is necessary to meet the needs of server-side components that are designed to run unattended.

Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.

That sounds pretty bad, right? However, in our experience, there is a large subset of Office features that work perfectly fine unattended.

However please heed the Redmond warning and test thoroughly, to make sure that your automation functions as expected in the background in Session 0. We will be here to help you if you run into any trouble!

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

AlwaysUp 11.5: Improvements for Session 0 Isolation, Server 2019, and more

Check out what's new in AlwaysUp 11.5

AlwaysUp version 11.5 is now available for download!

This release delivers a handful of important changes, along with the usual under-the-hood refinements.

“Switch to Session 0” removed when it’s not supported

As you may have noticed, Microsoft has crippled access to Session 0 in Windows 10 Build 1803 and later. And even though the writing had been on the wall for some time, we were still disappointed to see that convenient functionality removed from Windows. 🙁

But we live in Microsoft’s world, and we must react to their dictates as best we can.

So going forward, AlwaysUp will scan the operating system and determine if Session 0 is accessible or not. If it’s not, then:

  • The Switch to Session 0 toolbar button will be hidden:

    Switch to Session 0 Toolbar Button Removed

  • The Switch to Session 0 menu entry (found under the Tools menu) will be removed:

    Switch to Session 0 Menu Entry Removed

Note that your application will continue to run properly as a Windows Service in the isolated Session 0 — you just can’t see it there. You can always select Application > Restart in this session from the menu to bring your program visibly onto your desktop.

View & set Windows Service “Read” permissions

While AlwaysUp would allow you to set who can start, stop or modify each Windows Service it creates, the interface could not show (or grant) someone the ability to simply read the service. This shortcoming was recently addressed in Service Security Editor and we have now done the same in AlwaysUp.

Select Application > Advanced > Service Security Settings to interact with the new “Read” element:

View/Set Service Read Permissions

Technical enhancements for Windows Server 2019

Windows Server 2019 was released in October (and re-released in November after some disturbing technical glitches were addressed). AlwaysUp version 11.5 includes minor technical tweaks to ensure smooth, 24/7 operation of your Windows Services on Server 2019.

You can rest assured that AlwaysUp is fully compatible with the new OS.

Small Improvements for Windows Server 2019

Other fixes & improvements

  • Improved support for the latest builds of Windows 10 and Windows Server 2016. Each major update was thoroughly tested and no issues were found.

  • The registration window now displays the version number — to help customers complete registration on the correct version of the software.

  • The registration process provides additional labels and informative pop-up messages to help customers complete the process without incident.

  • The enhanced “Help” menu includes a link to our Blog and a link to an article describing how to report problems.

  • When AlwaysUp is running in evaluation mode, the title of the main window now mentions when the 30-day trial will expire.

As usual, please review the release notes for the full list of features, fixes and improvements included in this release.

Upgrading to AlwaysUp Version 11.5

If you purchased AlwaysUp version 10 (after January 2017) you can upgrade to version 11.5 for free. Just download and install “over the top” to preserve your existing applications and all settings. Your registration code will continue to work.

If you bought AlwaysUp version 9 or earlier (before January 2017), you will need to upgrade to use version 11.5. Please purchase upgrades here — at a 50% discount.

See the full upgrade policy for additional details.

Enjoy!

Posted in AlwaysUp | Tagged , , , , , | 1 Comment

Why should I Pay for AlwaysUp when Free Alternatives are Available?

Every now and then, someone reviewing our AlwaysUp software declares it “too expensive”. They ask: “Since I can find free tools (like Microsoft’s Srvany) to run my application as a Windows Service, why in the world would I spend $50 on your software?”

Sure, not everyone looking to run a program as a service needs AlwaysUp. A free tool can be a fine choice, especially for hobbyists and home users.

But if you are a professional working in a commercial environment, please be sure to answer these five questions before making a commitment:

1. Where will you go for help if you have questions (or things go wrong)?

The wonderful world of Windows Services can be tricky to navigate. Technical obstacles (like Session 0 Isolation) abound.

As a professional, you owe it to your business to plan for all eventualities.

Tech Support when you need it
  • Is there a phone number to call when you or your team needs urgent help?
  • How about a support email with a 24-48 hour response time?
  • Can you easily find online FAQ’s and other helpful resources?

At minimum, please make sure you have a contact!

2. How much of your own time will you have to spend on the “free” solution?

The cost of an item is usually more than its initial, sticker price. We often underestimate true, long-term cost because we forget to add our time to the equation.

For example, say you want to buy a new computer desk. Which is cheaper?

  1. A ready-to-go desk for $199
  2. The same desk from Ikea for $149

It’s a no-brainer, right? #2 is the way to go.

But what if it’s going to take you a couple of hours to unbox and assemble the Ikea furniture? Does option #1 (which avoids that extra labor) seem the more cost effective choice now?

Spend money to save time

Similarly, a free alternative to AlwaysUp definitely saves a few bucks at first.

But once you have the free software, how much of your valuable time must you devote to installation, troubleshooting and support? Might those ongoing costs dominate the equation?

We realize that your time is important. And we designed AlwaysUp to save you time — initially and over the many months and years you will use the product.

For example:

How much is your time worth?

3. Are you willing to take on the additional risk?

When you use unsupported software in your business, you become responsible for it when it fails. The buck stops with you.

At your own risk

Are you willing to assume that risk? To accept blame from your boss/team if the software misbehaves or becomes unusable after a Windows update?

Realize that your reputation (and perhaps your job) may be at stake, especially if you are operating a mission-critical system!

4. Are you sure you won’t need AlwaysUp’s extra features?

With over a decade of real-world use, AlwaysUp has evolved to include a ton of features — many of which are not found in free alternatives.

AlwaysUp is feature-rich

For example, AlwaysUp can:

  • Automatically restart your application if it crashes, hangs, or uses too much CPU
  • Send you an email when your application stops;
  • Boost your application’s priority, to make it run faster;
  • Capture your application’s output to a text file;
  • Send you a weekly report showing how your application is performing.

Check out this PDF flyer comparing AlwaysUp and Srvany for more:

AlwaysUp vs. Srvany (PDF)

As many customers have discovered, these extra features can come in very handy down the road!

5. How important is security?

Needless to say, you should be very careful when introducing new software into your secure environment.

AlwaysUp is digitally signed, so you can be positive that it is from our reputable company:

AlwaysUp is Digitally Signed

In addition, AlwaysUp has been evaluated by the US Department of Commerce Bureau of Industry and Security and has earned an export classification of EAR99:

AlwaysUp ECCN (PDF)

Can you say the same for the free software?

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

An Early Look at Windows Server 2019

Windows Server 2019 Preview

Have you heard? Microsoft is set to release Windows Server 2019 later this year. It seems that consumer releases (like Windows 10) are launched with trumpets and parades while server releases sneak up on you in the middle of the night! 🙂

So what’s new in Windows Server 2019?

Here are our highlights from the August 2018 Insider preview (Build 17744):

  1. Windows Admin Center (WAC): Microsoft’s powerful browser-based server management tool is a one-stop-shop for administering PC’s — locally or remotely. Check out our review of WAC for a deeper look.

    Windows Admin Center
  2. Windows Defender Advanced Threat Protection (ATP): Beyond the traditional preventative protection technologies found in previous versions Defender, ATP features support for post-breach intrusion detection, automated investigation, and more.

    Windows Threat Protection
  3. Improved Security for Linux VM’s: Linux virtual machines can now benefit from Server 2016’s Shielded Virtual Machines technology, which can help to prevent the unauthorized copying of company resources.

  4. Support for Kubernetes (in Beta): Administrators running Kubernetes pods will be happy to see first-class support for the popular container technology in Server 2019. This beta version is a respectable start and we look forward to continued improvements on the way to a general release early next year.

Any updates for Windows Services?

Server 2019 brings no documented changes to the Windows Services SDK functions. The Services Control Panel application remains the same as it has for many years now.

The only significant difference is the removal of the Interactive Services Detection service, which makes it impossible to access Session 0 in Server 2019. This is not a surprise though; Microsoft is being consistent with the same change made in Windows 10 build 1803 (released in April).

Does AlwaysUp work with Server 2019?

Yes!

Our week-long testing with various applications failed to uncover a single defect or problem.

Here is AlwaysUp happily running Dropbox as a Windows Service:

AlwaysUp running Dropbox on Server 2019

Does Service Protector run fine too?

The story was the same with Service Protector. No problems at all on Server 2019.

Here we see Service Protector protecting the Windows Defender Firewall Service:

Service Protector on Windows Server 2019

And how about all your other utilities?

Thumbs up there too!

Utilities running on Windows Server 2019

Where can I find out more about Windows Server 2019?

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

Q & A: How do I get AlwaysUp to run Java.exe in the PATH?

Q & A - Java
  I run a Java program EchoLink Proxy as part of Ham Radio networking. A routine update replaced the Java folder with its new version number thus my AlwaysUp Application field to run the program needed manual edit from:

C:\Program Files (x86)\Java\jre1.8.0_171\bin\java.exe

to

C:\Program Files (x86)\Java\jre1.8.0_181\bin\java.exe

I tried simply providing “Java.exe” (which works from a CMD prompt) but AlwaysUp requires the full-path. How can I get AlwaysUp to run the Java.exe in my PATH environment variable?

— Anonymous

Hi. AlwaysUp expects a full path, so I see the problem!

We recommend adding a “layer of indirection” to solve the problem. Please:

  1. Create a new Windows batch file that runs your full java command line. However, instead of specifying the full path to java, simply use java.exe.

    When run, the batch file will use whatever java.exe is in your Windows account’s PATH variable.

    Here is what our simple batch file (saved to “C:\Tools\start-java-app.bat”) looks like:

    Start Java Batch File

    Please open a command prompt, run your batch file and confirm that it launches your program (EchoLink Proxy) as you expect.

  2. Update your AlwaysUp entry to run the new batch file. Specify the full path to the batch file in the Application field on the General tab:

    Run the Batch File in AlwaysUp

    Be sure to clear the Arguments field if it contains the parameters for the Java command line! Those should already appear in the batch file.

  3. And on the AlwaysUp Logon tab, specify the Windows account you are logged in to right now. Java must be launched in this account so that it finds the correct PATH environment value.

    Set the account for running Java as a service
  4. Finally, update the new batch file to add a 5 second delay at the end. We recommend using the Windows TIMEOUT command, but there are several alternatives:

    timeout /t 5

    Without this adjustment, the batch file may exit very quickly and fool AlwaysUp into thinking that the batch file failed to start properly.

    Add a Timeout to the Batch File
  5. Save your batch file — and your settings in AlwaysUp.

Now, when you start your modified entry from AlwaysUp, the following will happen:

  1. AlwaysUp will start the batch file

  2. The batch file will launch Java from the PATH, as you have configured

  3. The batch file will “sleep” for 5 seconds

  4. The batch file will exit

  5. AlwaysUp will notice that the batch file has exited and “attach” to the Java.exe child process

  6. AlwaysUp will continue to monitor Java.exe and restart it (via the batch file) if it ever crashes/fails/exits.

Any monitoring, reporting and alerts you have configured should continue to work as they did before.

Please let us know if you run into any trouble implementing this approach!

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