{"id":1342,"date":"2014-12-29T10:15:43","date_gmt":"2014-12-29T15:15:43","guid":{"rendered":"http:\/\/enterpriseadmins.org\/blog\/?p=1342"},"modified":"2014-12-28T09:19:25","modified_gmt":"2014-12-28T14:19:25","slug":"a-missing-folder-a-missing-day","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/scripting\/a-missing-folder-a-missing-day\/","title":{"rendered":"A missing folder, a missing day"},"content":{"rendered":"<p>I recently moved some scheduled tasks from a Windows 2008R2 server to a Windows 2012R2 server.  This should be the easy type of work: copy some files, enter some credentials, move on to another project.  But as luck would have it, An exception occurred.  Those three words.<\/p>\n<p>One of the scheduled tasks uses a COM object to access Visio.Application.  The script enumerates a listing of Visio diagrams, sees if they are newer than a static version on a web server and if so runs SaveAsWeb for each new document.  After moving to a new server the &#8216;An exception occurred.&#8217; error kept showing up for each document being published when the script ran as a scheduled task.  Running the script interactively worked fine.  A bunch of searching kept pointing at <strong>dcomcnfg<\/strong>, specifically for an entry named Visio Document and\/or Microsoft Office Visio Document.  This option did not show up for me.  I even re-installed Visio and rebooted hoping to re-register the COM object.  When I was just about ready to give up, I found <a href=\"https:\/\/social.technet.microsoft.com\/Forums\/office\/en-US\/1998fb5b-6660-403e-977b-b14670302aca\/systemruntimeinteropservicescomexception-0x86db1068?forum=visiogeneral\">this simple article<\/a>, with a comment all the way at the end:<\/p>\n<p><quote>You need to ensure that the folder C:\\Windows\\System32\\config\\systemprofile\\Desktop exists. It&#8217;s the same when you try to automate Word in a service.<\/quote><\/p>\n<p>Could it really be that simple?  Would creating one folder solve the day long project?  The answer &#8212; yes.  I browsed to C:\\Windows\\System32\\config\\systemprofile and created a folder named Desktop.  The scheduled task now works fine on the new server.  One missing folder, one missing day in troubleshooting a simple task.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently moved some scheduled tasks from a Windows 2008R2 server to a Windows 2012R2 server. This should be the easy type of work: copy some files, enter some credentials, move on to another project. But as luck would have &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/scripting\/a-missing-folder-a-missing-day\/\">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-1342","post","type-post","status-publish","format-standard","hentry","category-scripting"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1342","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=1342"}],"version-history":[{"count":2,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1342\/revisions"}],"predecessor-version":[{"id":1344,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1342\/revisions\/1344"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=1342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=1342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=1342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}