{"id":5572,"date":"2018-12-17T06:06:47","date_gmt":"2018-12-17T14:06:47","guid":{"rendered":"https:\/\/www.coretechnologies.com\/blog\/?p=5572"},"modified":"2018-12-17T06:06:47","modified_gmt":"2018-12-17T14:06:47","slug":"cae-visio-windows-service","status":"publish","type":"post","link":"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/cae-visio-windows-service\/","title":{"rendered":"Q &#038; A: Can my CAE\/Visio Application Run Properly as a Windows Service?"},"content":{"rendered":"<div align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/images\/qa-cae-application.png\" width=\"380\" height=\"154\" title=\"Q &#038; A - Computer Aided Engineering Application\" alt=\"Q &#038; A - Computer Aided Engineering Application\" border=\"0\" ><\/div>\n<div class=\"blog-qa-question-box\">\n<img decoding=\"async\" src=\"\/images\/quotes-transparent-21x21.png\">&nbsp;&nbsp;I must run a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Computer-aided_engineering\" target=\"_blank\" rel=\"noopener noreferrer\">Computer Aided Engineering (CAE)<\/a> application as a service but it doesn&#8217;t work with <a href=\"\/products\/AlwaysUp\/\">AlwaysUp<\/a>. I guess that <a href=\"https:\/\/en.wikipedia.org\/wiki\/Microsoft_Visio\" target=\"_blank\" rel=\"noopener noreferrer\">Visio<\/a> 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&#8217;s also not working.<\/p>\n<p>Any idea what I can do to isolate the problem?<\/p>\n<p align=\"right\">&#8212; R\u00fcdiger Lange, <a href=\"https:\/\/www.aucotec.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">AUCOTEC<\/a><\/p>\n<\/div>\n<p>Hi R\u00fcdiger. You are likely running into a couple of problems. Here are our recommendations to resolve the issues:<\/p>\n<h2 class=\"blog-caption\">Specify the correct Windows account in AlwaysUp<\/h2>\n<p>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.<\/p>\n<p>You see, when you installed and configured Visio, it saved several settings in your account. <b>Those settings are not accessible to other users of the computer.<\/b><\/p>\n<p>Even if another user found and launched the Visio executable, Visio would start, but it may come up &#8220;blank&#8221;. Whatever settings you provided at installation (and any changes you subsequently made while using Visio) may not be visible.<\/p>\n<p>So please enter the user name and password of your Visio Windows account on the <b>Logon tab<\/b> to have AlwaysUp start your CAE application in that account. For example, here we have configured the &#8220;Administrator&#8221; account:<\/p>\n<div align=\"center\"><a href=\"\/products\/AlwaysUp\/Screenshots\/alwaysup-add-application-logon-tab.png\" class=\"zoomPopup\" title=\"Specify the account for Visio\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"https:\/\/cdn.coretechnologies.com\/blog\/images\/set-logon-account-for-java-service.png\" title=\"Specify the account for Visio (click to enlarge)\" alt=\"Specify the account for Visio\" border=\"0\" ><\/a><\/div>\n<h2 class=\"blog-caption\">Start Visio as a Windows Service too<\/h2>\n<p>AlwaysUp will run your CAE application in the background, in the <a href=\"\/WindowsServices\/FAQ.html#WhatIsSession0Isolation\">isolated Session 0<\/a>. 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.<\/p>\n<p>We don&#8217;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:<\/p>\n<ul>\n<li><a href=\"\/products\/AlwaysUp\/Apps\/RunExcel2013AsAWindowsService.html\">Excel 2013<\/a><\/li>\n<li><a href=\"\/products\/AlwaysUp\/Apps\/RunWord2010AsAWindowsService.html\">Word 2010<\/a><\/li>\n<li><a href=\"\/products\/AlwaysUp\/Apps\/RunAccess2007AsAService.html\">Access 2007<\/a><\/li>\n<\/ul>\n<p>But please be aware of the following <a href=\"https:\/\/support.microsoft.com\/en-us\/help\/257757\/considerations-for-server-side-automation-of-office\" target=\"_blank\" rel=\"noopener noreferrer\">cautionary note from Microsoft<\/a> for when running an Office program as a Windows Service:<\/p>\n<div class=\"highlight-box-green\" style=\"background:#ffe6e6;\">\n<img decoding=\"async\" src=\"\/images\/quotes-transparent-21x21.png\"> 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.<\/p>\n<p>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.<\/p>\n<p>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.\n<\/p><\/div>\n<p>That sounds pretty bad, right? However, in our experience, there is a large subset of Office features that work perfectly fine unattended.<\/p>\n<p>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 <a href=\"\/support\/\">here to help you<\/a> if you run into any trouble!<\/p>\n<!-- relpost-thumb-wrapper --><div class=\"relpost-thumb-wrapper\"><!-- filter-class --><div class=\"relpost-thumb-container\"><style>.relpost-block-single-image, .relpost-post-image { margin-bottom: 10px; }<\/style><h3>You may also like...<\/h3><div style=\"clear: both\"><\/div><div style=\"clear: both\"><\/div><!-- relpost-block-container --><div class=\"relpost-block-container relpost-block-column-layout\" style=\"--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2\"><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/vb6-memory-leaks\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q&amp;A: How do I Make AlwaysUp Babysit my Leaky VB6 Program?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/memory-leaks-growing-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Q&amp;A: How do I Make AlwaysUp Babysit my &quot;Leaky&quot; VB6 Program?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/windows-services\/windows-service-start-at-boot\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Why doesn&#039;t my Windows Service Start at Boot?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/computer-not-working-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Why doesn&#039;t my Windows Service Start at Boot?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/windows-services\/samss\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Essential Windows Services: Security Accounts Manager \/ SamSs\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/security-accounts-manager-150x150-1.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Essential Windows Services: Security Accounts Manager \/ SamSs<\/h2><\/div><\/div><\/a><\/div><!-- close relpost-block-container --><div style=\"clear: both\"><\/div><\/div><!-- close filter class --><\/div><!-- close relpost-thumb-wrapper -->","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;I must run a Computer Aided Engineering (CAE) application as a service but it doesn&#8217;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) &hellip; <a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/cae-visio-windows-service\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":3560,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[26,55,56,104,127,178,196],"class_list":["post-5572","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-alwaysup","tag-alwaysup-tag","tag-com","tag-computer-aided-engineering","tag-microsoft-office","tag-qa","tag-visio","tag-windows-services-2"],"_links":{"self":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/5572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=5572"}],"version-history":[{"count":0,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/5572\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media\/3560"}],"wp:attachment":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=5572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=5572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=5572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}