<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VBScript error: could not locate automation class in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/103213#M9012</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not an expert on VBScript, but when you use the File | Schedule project menu option in EG, it creates a VBScript file to run the project. When I did that on my PC, the equivalent line to what is giving you a problem is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set app = CreateObject("SASEGObjectModel.Application.5.1")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could your having WScript in front of CreateObject be causing the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Oct 2013 20:56:12 GMT</pubDate>
    <dc:creator>TomKari</dc:creator>
    <dc:date>2013-10-03T20:56:12Z</dc:date>
    <item>
      <title>VBScript error: could not locate automation class</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/103212#M9011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using SAS Enterprise Guide 5.1 (32-bit)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to run these two lines of code in VBScript:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Application = WScript.CreateObject("SASEGObjectModel.Application.5.1")&lt;BR /&gt;WScript.Echo Application.Name &amp;amp; ", Version: " &amp;amp; Application.Version&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I receive the error below. Is there another line of code that I need to add or do I need to specify the path of EG 5.1?&lt;/P&gt;&lt;P&gt;Error: could not locate automation class named "SASEGObjectModel.Application.5.1".&lt;BR /&gt;Code: 80020009&lt;BR /&gt;Source: WScript.Createobject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 20:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/103212#M9011</guid>
      <dc:creator>gzr2mz39</dc:creator>
      <dc:date>2013-10-03T20:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript error: could not locate automation class</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/103213#M9012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not an expert on VBScript, but when you use the File | Schedule project menu option in EG, it creates a VBScript file to run the project. When I did that on my PC, the equivalent line to what is giving you a problem is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set app = CreateObject("SASEGObjectModel.Application.5.1")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could your having WScript in front of CreateObject be causing the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 20:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/103213#M9012</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2013-10-03T20:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript error: could not locate automation class</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/103214#M9013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have 32-bit EG but a 64-bit Windows, make sure you're running the correct CSCRIPT.exe.&amp;nbsp; See the notes at:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2011/05/03/using-sas-enterprise-guide-to-run-programs-in-batch/" title="http://blogs.sas.com/content/sasdummy/2011/05/03/using-sas-enterprise-guide-to-run-programs-in-batch/"&gt; Using SAS Enterprise Guide to run programs in batch - The SAS Dummy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 21:30:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/103214#M9013</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-10-03T21:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript error: could not locate automation class</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/103215#M9014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris,&lt;/P&gt;&lt;P&gt;Thank you for the link. Lots of good info.&lt;/P&gt;&lt;P&gt;With other vbscripts I am able to run them by double-clicking on the vbs file.&lt;/P&gt;&lt;P&gt;Is this possible with the code in the link you sent or do you have to use command line to run the vbscript code?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 00:06:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/103215#M9014</guid>
      <dc:creator>gzr2mz39</dc:creator>
      <dc:date>2013-10-04T00:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript error: could not locate automation class</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/103216#M9015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The default action for a VBS file on your 64-bit machine is &lt;STRONG&gt;probably&lt;/STRONG&gt; to run the 64-bit version of WSCRIPT.&amp;nbsp; That won't work if you are trying to automate 32-bit EG, because the required entries are not present in the 64-bit region of the Windows registry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, long story made short, best to run the 32-bit version of WSCRIPT or CSCRIPT.&amp;nbsp; I like CSCRIPT because it puts output to the console instead of popping up windows that might hang your process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 00:40:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/103216#M9015</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-10-04T00:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript error: could not locate automation class</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/248088#M17567</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm testing automation on SAS EG7.1 {precisely, 7.11 HF2 (7.100.1.2785) (32-bit)} using a Windows 7, 32-bit machine, and SAS EG is also 32-bit. &amp;nbsp;So I only have the 32-bit version of cscript.exe. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting a similar error as the one from 3 years ago above - Could not locate automation class named "SASEGObjectModel.Application.7.1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim Application&lt;BR /&gt;Set Application = WScript.CreateObject("SASEGObjectModel.Application.7.1")&lt;BR /&gt;WScript.Echo Application.Name &amp;amp; ", Version: " &amp;amp; Application.Version&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise. &amp;nbsp;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 20:46:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/248088#M17567</guid>
      <dc:creator>SASUser000</dc:creator>
      <dc:date>2016-02-04T20:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript error: could not locate automation class</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/248091#M17569</link>
      <description>&lt;P&gt;You might need to register the EG automation object model. &amp;nbsp;Run this from a command prompt:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;c:\Windows\Microsoft.NET\Framework\v4.0.30319\rega&lt;/SPAN&gt;&lt;WBR /&gt;&lt;SPAN&gt;sm /codebase "&lt;/SPAN&gt;&lt;SPAN&gt;c:\Program Files\SASHome\SASEnterpriseGuide\7.1\&lt;/SPAN&gt;&lt;SPAN&gt;sasegscripting.dll"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sample output:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Microsoft .NET Framework Assembly Registration Utility version 4.0.30319.18408
for Microsoft .NET Framework version 4.0.30319.18408
Copyright (C) Microsoft Corporation.  All rights reserved.

Types registered successfully&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Then try your script.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 20:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/248091#M17569</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-02-04T20:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript error: could not locate automation class</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/248100#M17570</link>
      <description>&lt;P&gt;Brilliant! &amp;nbsp;I couldn't find the dll there, but I did find it elsewhere. Pretty much working now, except that it prompts me to login to the SAS server. &amp;nbsp;I can probably figure that one out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciated...&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 21:23:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/248100#M17570</guid>
      <dc:creator>SASUser000</dc:creator>
      <dc:date>2016-02-04T21:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript error: could not locate automation class</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/256674#M17987</link>
      <description>&lt;P&gt;Hi Chris,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use EG 7.11(64 bit) scheduling on Windows 10(64 bit).&lt;BR /&gt;I follow your instruction&amp;nbsp;(&lt;A href="http://blogs.sas.com/content/sasdummy/2011/05/03/using-sas-enterprise-guide-to-run-programs-in-batch/" target="_blank" rel="nofollow"&gt; Using SAS Enterprise Guide to run programs in batch - The SAS Dummy&lt;/A&gt;&lt;SPAN&gt;) and do more as you mention.&lt;BR /&gt;&lt;EM&gt;c:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm /codebase "c:\Program Files\SASHome\SASEnterpriseGuide\7.1\sasegscripting.dll"&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But Scheduler can not invoke vbs which get from EG , right now.&lt;BR /&gt;&lt;BR /&gt;Could you mind to suggest how to fix?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 01:46:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/256674#M17987</guid>
      <dc:creator>kritima</dc:creator>
      <dc:date>2016-03-15T01:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript error: could not locate automation class</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/256889#M17994</link>
      <description>&lt;P&gt;I'd start by verifying that you can use automation from a VBS script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a simple script that you can save into a local VBS file -- for example, testEg.vbs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;' force declaration of variables in VB Script
Option Explicit
Dim Application
' Create a new SAS Enterprise Guide automation session
Set Application = WScript.CreateObject("SASEGObjectModel.Application.7.1")
WScript.Echo Application.Name &amp;amp; ", Version: " &amp;amp; Application.Version
Application.Quit&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know we've touched on this, but make sure you're running the proper version of the scripting engine for your 64-bit SAS Enterprise Guide:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;%windir%\system32\cscript.exe c:\projects\testEg.vbs&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output should be something like:&lt;/P&gt;
&lt;PRE&gt;C:\Projects&amp;gt;%windir%\system32\cscript c:\projects\testEg.vbs
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Enterprise Guide, Version: 7.100.2.0&lt;/PRE&gt;
&lt;P&gt;If that works, but the scheduler doesn't, then you'll need to dig into why the Windows Task Scheduler isn't launching your process at the appointed time. &amp;nbsp;The cause is probably not related to SAS Enterprise Guide; you &lt;A href="https://blogs.technet.microsoft.com/askperf/2011/06/10/two-minute-drill-quickly-test-task-scheduler/" target="_self"&gt;could run some independent tests&lt;/A&gt; of the scheduler to see what's going on.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 19:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/256889#M17994</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-03-15T19:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript error: could not locate automation class</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/256994#M18005</link>
      <description>&lt;P&gt;Thank you very much Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is on &lt;SPAN&gt;Windows Task Scheduler&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 12:24:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-error-could-not-locate-automation-class/m-p/256994#M18005</guid>
      <dc:creator>kritima</dc:creator>
      <dc:date>2016-03-16T12:24:57Z</dc:date>
    </item>
  </channel>
</rss>

