{"id":383,"date":"2011-06-10T14:25:14","date_gmt":"2011-06-10T18:25:14","guid":{"rendered":"http:\/\/enterpriseadmins.org\/blog\/?p=383"},"modified":"2011-06-10T14:25:14","modified_gmt":"2011-06-10T18:25:14","slug":"64bit-dos-commands-with-a-32bit-two-bit-application","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/scripting\/64bit-dos-commands-with-a-32bit-two-bit-application\/","title":{"rendered":"64bit DOS commands with a 32bit (two-bit) application"},"content":{"rendered":"<p>This week I worked with a group of people that have a monitoring application &#8212; basically a glorified task scheduler for 32bit DOS applications.  Among other things, this application attempts to check Microsoft Cluster Services (MSCS) failover status and send emails (using BLAT.exe) in the event a cluster was unbalanced.  The code was no longer working after moving to Windows 2008R2.  While helping them debug code, I realized that the &#8216;cluster&#8217; command was not producing any output; likely due to the 32bit mode scheduler.  A quick Google search came up with a simple solution &#8212; use the Windows SYSNATIVE directory instead of SYSTEM32 (<a href=\"http:\/\/www.tipandtrick.net\/2008\/how-to-suppress-and-bypass-system32-file-system-redirect-to-syswow64-folder-with-sysnative\/\">http:\/\/www.tipandtrick.net\/2008\/how-to-suppress-and-bypass-system32-file-system-redirect-to-syswow64-folder-with-sysnative\/<\/a>).  <\/p>\n<p>However, updating the code caused a slight problem because the sysnative path was not available on their down level clusters.  Here is a very simple workaround, but one I thought worth mentioning:<\/p>\n<pre>\r\nif exist \"C:\\Windows\\sysnative\\cluster.exe\" (\r\nset clusterPath=\"C:\\Windows\\sysnative\\cluster.exe\"\r\n) else (\r\nset clusterPath=%windir%\\system32\\cluster.exe\r\n)\r\n\r\necho %clusterPath%\r\n<\/pre>\n<p>This batch file code checks for the existence of the sysnative\\cluster.exe and if it is not available fails back to the previous path.  A very simple solution, but the customer is happy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week I worked with a group of people that have a monitoring application &#8212; basically a glorified task scheduler for 32bit DOS applications. Among other things, this application attempts to check Microsoft Cluster Services (MSCS) failover status and send &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/scripting\/64bit-dos-commands-with-a-32bit-two-bit-application\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-383","post","type-post","status-publish","format-standard","hentry","category-scripting"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/comments?post=383"}],"version-history":[{"count":3,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions"}],"predecessor-version":[{"id":386,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions\/386"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}