{"id":1040,"date":"2014-12-01T06:00:27","date_gmt":"2014-12-01T14:00:27","guid":{"rendered":"http:\/\/www.coretechnologies.com\/blog\/?p=1040"},"modified":"2021-09-04T12:47:42","modified_gmt":"2021-09-04T19:47:42","slug":"troubleshoot-alwaysup-command-prompt","status":"publish","type":"post","link":"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/troubleshoot-alwaysup-command-prompt\/","title":{"rendered":"AlwaysUp not Starting your Application? Troubleshoot with the Command Prompt"},"content":{"rendered":"<p>\nIf you find that your application is starting and then quickly stopping when you run it with AlwaysUp, your application may be trying to report an error message that you simply cannot see. In this situation, we recommend starting your application from a command prompt running as a service, to find out if something useful is being written to the console.\n<\/p>\n<h2><b>How to start CMD.EXE as a service on your desktop<\/b><\/h2>\n<ol>\n<li>\n<p>\nHighlight your troublesome application in AlwaysUp and select <b>Add Copy&#8230;<\/b> from the <b>Application<\/b> menu.\n<\/p>\n<p>\n(In this guide, our &#8220;StartServer&#8221; batch file is failing for some unknown reason so we&#8217;ll work with that entry&#8230;)\n<\/p>\n<p><a href=\"\/blog\/images\/cmd-service-add-copy.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Add Copy\" target=\"_blank\"><img decoding=\"async\" src=\"\/blog\/images\/cmd-service-add-copy.png\" class=\"image-padding\" border=\"0\" title=\"Add Copy (click to enlarge)\" alt=\"Add Copy\" width=\"540\" \/><\/a><\/p>\n<p>\n<\/li>\n<li>\n<p>\nIn the <b>Add Application<\/b> window that comes up:\n<\/p>\n<ol type=\"a\">\n<li>\n<p>\nIn the <b>Application<\/b> field, enter the full path to the windows command prompt. This is:<\/p>\n<blockquote><p><b>C:\\Windows\\System32\\cmd.exe<\/b><\/p><\/blockquote>\n<\/li>\n<li>\n<p>\nIf there is anything in the <b>Arguments<\/b> field brought over from the application you copied, please remove it.\n<\/p>\n<\/li>\n<li>\n<p>\nChange the <b>Name<\/b> field to something meaningful. We have entered &#8220;CMD Testing&#8221; in this guide.\n<\/p>\n<\/li>\n<li>\n<p>\nSet the <b>Start the application<\/b> field to <b>Manually, from AlwaysUp<\/b>. We don&#8217;t want this command prompt service to start automatically at boot.\n<\/p>\n<\/li>\n<\/ol>\n<p><a href=\"\/blog\/images\/cmd-service-general-tab.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Command Prompt Service - General\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/images\/cmd-service-general-tab.png\" class=\"image-padding\" width=\"425\" height=\"604\" border=\"0\" title=\"Command Prompt Service - General (click to enlarge)\" alt=\"Command Prompt Service - General\" \/><\/a><\/p>\n<p>\n<\/li>\n<li>\n<p>\nIf you have specified a user on the <b>Logon<\/b> tab, switch over there and re-enter the password (a security measure).\n<\/p>\n<p><a href=\"\/blog\/images\/cmd-service-logon-tab.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Command Prompt Service - Logon\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/images\/cmd-service-logon-tab.png\" class=\"image-padding\" width=\"425\" height=\"604\" border=\"0\" title=\"Command Prompt Service - Logon (click to enlarge)\" alt=\"Command Prompt Service - Logon\" \/><\/a><\/p>\n<p>\n<\/li>\n<li>\n<p>\nThose are all the changes we need to make so click the <b>Save &gt;&gt;<\/b> button to record your new service. It will show up on the AlwaysUp console soon.\n<\/p>\n<p><a href=\"\/blog\/images\/cmd-service-saved.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Command Prompt Service Saved\" target=\"_blank\"><img decoding=\"async\" src=\"\/blog\/images\/cmd-service-saved.png\" class=\"image-padding\" border=\"0\" title=\"Command Prompt Service Saved (click to enlarge)\" alt=\"Command Prompt Service Saved\" width=\"540\" \/><\/a><\/p>\n<p>\n<\/li>\n<li>\n<p>\nNext, start the new CMD service on your desktop by selecting <b>Application &gt; Start &#8220;CMD Testing&#8221; in this session<\/b>:\n<\/p>\n<p><a href=\"\/blog\/images\/cmd-service-start-in-session.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Start Command Prompt in Session\" target=\"_blank\"><img decoding=\"async\" src=\"\/blog\/images\/cmd-service-start-in-session.png\" class=\"image-padding\" border=\"0\" title=\"Start Command Prompt in Session (click to enlarge)\" alt=\"Start Command Prompt in Session\" width=\"540\" \/><\/a><\/p>\n<p>\nIn a few seconds, the familiar black box will pop up on your desktop:\n<\/p>\n<p><a href=\"\/blog\/images\/cmd-service-started.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Command Prompt Service Started\" target=\"_blank\"><img decoding=\"async\" src=\"\/blog\/images\/cmd-service-started.png\" class=\"image-padding\" border=\"0\" title=\"Command Prompt Service Started (click to enlarge)\" alt=\"Command Prompt Service Started\" width=\"540\" \/><\/a><\/p>\n<p>\n<\/li>\n<p><a name=\"step6\"><\/a><br \/>\n<a name=\"use-command-prompt\"><\/a><\/p>\n<li>\n<p>\nAnd finally, in the command box, <b><u>type in the full command line you gave to AlwaysUp &mdash; application &amp; arguments<\/u><\/b>. Be sure to specify the exact values that you had supplied to your AlwaysUp service! Please cut &amp; paste to ensure accuracy.\n<\/p>\n<p>Hit Enter to run your application and pay special attention to what is written to the command prompt.<\/p>\n<\/li>\n<p>\nHopefully at this point your application will tell us what is wrong! In our case (pictured below), the batch file can&#8217;t find the JAR file it is expecting&#8230;\n<\/p>\n<p><a href=\"\/blog\/images\/cmd-service-error-message.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Command Prompt Showing the Error Message\" target=\"_blank\"><img decoding=\"async\" src=\"\/blog\/images\/cmd-service-error-message.png\" class=\"image-padding\" border=\"0\" title=\"Command Prompt Showing the Error Message (click to enlarge)\" alt=\"Command Prompt Showing the Error Message\" width=\"540\" \/><\/a><\/p>\n<h2><b>Resolving the problem<\/b><\/h2>\n<p>Common errors include:<\/p>\n<ul>\n<li>Running the wrong executable (<a href=\"http:\/\/www.urbandictionary.com\/define.php?term=d%27oh\" target=\"_blank\" rel=\"noopener noreferrer\">doh!<\/a>)<\/li>\n<li>Not properly quoting command-line parameters (smacks forehead)<\/li>\n<li>Not running from the correct directory (which you can fix by adding the folder on the <a href=\"\/products\/AlwaysUp\/Screenshots\/alwaysup-add-application-general-tab-415x593.jpg\">General tab<\/a>)<\/li>\n<li>Insufficient permissions to access a required resource (are you using the right user on the <a href=\"\/products\/AlwaysUp\/Screenshots\/alwaysup-add-application-logon-tab-415x593.jpg\">Logon tab<\/a>?)<\/li>\n<\/ul>\n<p>The <a href=\"\/products\/AlwaysUp\/AlwaysUp_FAQ.html\" target=\"_blank\" rel=\"noopener noreferrer\">AlwaysUp Frequently Asked Questions (FAQ)<\/a> will help you resolve these and other common issues. And if you&#8217;re still stuck, please feel free to <a href=\"\/support\/\" target=\"_blank\" rel=\"noopener noreferrer\">contact us<\/a> for fresh ideas and expert advice \ud83d\ude42<\/p>\n<h2><b>And don&#8217;t forget to cleanup when you&#8217;re done&#8230;<\/b><\/h2>\n<p>Once you&#8217;ve fixed the problem and verified that your application can start normally with AlwaysUp, please feel free to remove the CMD service by highlighting the entry in AlwaysUp and selecting <nobr><b>Application > Remove<\/b><\/nobr>.<\/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\/windows-services\/delay-service-start\/\"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 Delay the Start of my Windows Service?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/delay-windows-service-start-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\">Q&amp;A: How Do I Delay the Start of my Windows Service?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/onedrive-windows-service-help\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"OneDrive Windows Service Problems\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/onedrive-windows-service-problem-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\">My OneDrive Windows Service Doesn&#039;t Work - Help!<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/register-no-internet\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q&amp;A: Can I Activate\/Register AlwaysUp Without an Internet Connection?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/no-internet-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: Can I Activate\/Register AlwaysUp Without an Internet Connection?<\/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>If you find that your application is starting and then quickly stopping when you run it with AlwaysUp, your application may be trying to report an error message that you simply cannot see. In this situation, we recommend starting your &hellip; <a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/troubleshoot-alwaysup-command-prompt\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2218,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[26,170],"class_list":["post-1040","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-alwaysup","tag-alwaysup-tag","tag-troubleshooter"],"_links":{"self":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1040","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=1040"}],"version-history":[{"count":6,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1040\/revisions"}],"predecessor-version":[{"id":10603,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1040\/revisions\/10603"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media\/2218"}],"wp:attachment":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=1040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=1040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=1040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}