I am using Eviews8 on windows7 machine ,in order to invoke Eviews from a vbscript.
I am getting following error-
C:\Users\sanjay>"C:\Windows\SysWOW64\cscript.exe" D:\marketshare\practice\extract_orig.vbs D:\marketshare\practice
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
D:\marketshare\practice\extract_orig.vbs(44, 1) Microsoft VBScript runtime error
: Error in loading DLL: 'mgr.GetApplication'
In the script I am doing some thing like this-
set mgr = CreateObject("Eviews.Manager")
set app = mgr.GetApplication( 1 )
What am I doing wrong here? Any response will be highly appreciated.
Thanks!
Eviews8-Using with .vbs for extraction.
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Eviews8-Using with .vbs for extraction.
Ok, a few things to check for.
1. Make sure you download the latest patch for EViews 8. You can do this by running EViews and going to EViews Help Menu->EViews Update. Re-start EViews to install the update.
2. Make sure your copy of EViews 8 is registered properly. Run the EViews command "REGCOMPONENTS" and then click "Yes (All)" to re-register everything. Wait for the success message to appear.
3. The Prog ID for the EViews 8 Manager object is: "EViews.Manager.8". If you just ask for "EViews.Manager" it will return to you a COM object for the version of EViews that was last registered (which might be an older version like EViews 7).
4. If you are running the 32-bit VBS script engine, make sure you have the EViews 8 32-bit version installed. While technically a 32-bit VBS script should be able to use a 64-bit EViews COM component, there might be licensing issues on your machine that's preventing this. If you have EViews 8 64-bit installed, don't run your VBS script using the 32-bit script engine. Use the default 64-bit one.
5. Finally, see if there is an error message returned by CreateObject. You can display an error message like this:
Report back if you get an error message...
Steve
1. Make sure you download the latest patch for EViews 8. You can do this by running EViews and going to EViews Help Menu->EViews Update. Re-start EViews to install the update.
2. Make sure your copy of EViews 8 is registered properly. Run the EViews command "REGCOMPONENTS" and then click "Yes (All)" to re-register everything. Wait for the success message to appear.
3. The Prog ID for the EViews 8 Manager object is: "EViews.Manager.8". If you just ask for "EViews.Manager" it will return to you a COM object for the version of EViews that was last registered (which might be an older version like EViews 7).
Code: Select all
Set mgr = CreateObject("EViews.Manager.8")5. Finally, see if there is an error message returned by CreateObject. You can display an error message like this:
Code: Select all
On Error Resume Next
Err.Clear
Set mgr = CreateObject("EViews.Manager.8")
If Err.Number <> 0 Then
WScript.Echo "Error: " & Err.Description
Err.Clear
Else
WScript.Echo "OK"
End If
On Error Goto 0Steve
Re: Eviews8-Using with .vbs for extraction.
Thanks for the help Steve..
Still the issue is unresolved...I tried all the steps except 4.
*Installing the latest patch
*Run the EViews command "REGCOMPONENTS" and reinstalled.
*created object with "Set mgr = CreateObject("EViews.Manager.8")" in vbscript
*tried to see if the error message is returned by createobject, it returns OK
Below error
C:\Users\sanjay>"C:\Windows\SysWOW64\cscript.exe" D:\marketshare\practice\extrac
t_orig.vbs D:\marketshare\practice"
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
OK
D:\marketshare\practice\extract_orig.vbs(57, 1) Microsoft VBScript runtime error
: Error in loading DLL: 'mgr.GetApplication'
VBScript file-
set mgr = CreateObject("Eviews.Manager.8")
On Error Resume Next
Err.Clear
Set mgr = CreateObject("EViews.Manager.8")
If Err.Number <> 0 Then
WScript.Echo "Error: " & Err.Description
Err.Clear
Else
WScript.Echo "OK"
End If
On Error Goto 0
set app = mgr.GetApplication( 1 )
What I am doing wrong here?How to check about point 4.
Please throw some more light.
Thanks..
Still the issue is unresolved...I tried all the steps except 4.
*Installing the latest patch
*Run the EViews command "REGCOMPONENTS" and reinstalled.
*created object with "Set mgr = CreateObject("EViews.Manager.8")" in vbscript
*tried to see if the error message is returned by createobject, it returns OK
Below error
C:\Users\sanjay>"C:\Windows\SysWOW64\cscript.exe" D:\marketshare\practice\extrac
t_orig.vbs D:\marketshare\practice"
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
OK
D:\marketshare\practice\extract_orig.vbs(57, 1) Microsoft VBScript runtime error
: Error in loading DLL: 'mgr.GetApplication'
VBScript file-
set mgr = CreateObject("Eviews.Manager.8")
On Error Resume Next
Err.Clear
Set mgr = CreateObject("EViews.Manager.8")
If Err.Number <> 0 Then
WScript.Echo "Error: " & Err.Description
Err.Clear
Else
WScript.Echo "OK"
End If
On Error Goto 0
set app = mgr.GetApplication( 1 )
What I am doing wrong here?How to check about point 4.
Please throw some more light.
Thanks..
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Eviews8-Using with .vbs for extraction.
Hmm, if you're still getting the error, then it's being thrown by the "GetApplication" call so you need to check for the error message after that line like this:
By the way, I just tested this script on my Windows 7 64-bit machine, running the 32-bit VBS script engine talking to my EViews 8 64-bit and it worked fine.
Steve
Code: Select all
On Error Resume Next
Err.Clear
Set mgr = CreateObject("EViews.Manager.8")
If err.number <> 0 then
WScript.Echo "Error: " & Err.Description
Err.Clear
Else
WScript.Echo "OK"
end if
Set app = mgr.GetApplication(1)
If err.number <> 0 then
WScript.Echo "Error: " & Err.Description
Err.Clear
Else
WScript.Echo "OK"
end ifSteve
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Eviews8-Using with .vbs for extraction.
So did you get it working?
Re: Eviews8-Using with .vbs for extraction.
Hi Steve,
I have introduced the error related code in .vbs as mentioned-
VBScript file-
---
---
set mgr = CreateObject("Eviews.Manager.8")
If err.number <> 0 then
WScript.Echo "Error: " & Err.Description
Err.Clear
Else
WScript.Echo "OK"
end if
set app = mgr.GetApplication(1)
If err.number <> 0 then
WScript.Echo "Error: " & Err.Description
Err.Clear
Else
WScript.Echo "OK"
end if
---
---
Still i get the same issue as mentioned with output--
C:\Users\sanjay>"C:\Windows\SysWOW64\cscript.exe" D:\marketshare\practice\extrac
t_orig.vbs D:\marketshare\practice
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
OK
D:\marketshare\practice\extract_orig.vbs(50, 1) Microsoft VBScript runtime error
: Error in loading DLL: 'mgr.GetApplication'
I am also using windows7 64 bit,Eviews8 64 bit.
Looks like the problem is with GetApplication,any thought into it.
-Sanjay
I have introduced the error related code in .vbs as mentioned-
VBScript file-
---
---
set mgr = CreateObject("Eviews.Manager.8")
If err.number <> 0 then
WScript.Echo "Error: " & Err.Description
Err.Clear
Else
WScript.Echo "OK"
end if
set app = mgr.GetApplication(1)
If err.number <> 0 then
WScript.Echo "Error: " & Err.Description
Err.Clear
Else
WScript.Echo "OK"
end if
---
---
Still i get the same issue as mentioned with output--
C:\Users\sanjay>"C:\Windows\SysWOW64\cscript.exe" D:\marketshare\practice\extrac
t_orig.vbs D:\marketshare\practice
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
OK
D:\marketshare\practice\extract_orig.vbs(50, 1) Microsoft VBScript runtime error
: Error in loading DLL: 'mgr.GetApplication'
I am also using windows7 64 bit,Eviews8 64 bit.
Looks like the problem is with GetApplication,any thought into it.
-Sanjay
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Eviews8-Using with .vbs for extraction.
Steve is on vacation for a week. I'm sure he'll get back to you once he returns.
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Eviews8-Using with .vbs for extraction.
Hmm, I don't really know then.
Perhaps you should try running cscript.exe as an administrator?
I would also try just creating a VB.NET windows application that does the same thing to see if there is something weird going on with your cscript engine.
If you want to check which version of EViews you are running, start EViews and go to the Help->About screen. If you see "64-bit" anywhere on the About dialog, you are running EViews 8 64-bit. If you don't, you are running EViews 8 32-bit.
Steve
Perhaps you should try running cscript.exe as an administrator?
I would also try just creating a VB.NET windows application that does the same thing to see if there is something weird going on with your cscript engine.
If you want to check which version of EViews you are running, start EViews and go to the Help->About screen. If you see "64-bit" anywhere on the About dialog, you are running EViews 8 64-bit. If you don't, you are running EViews 8 32-bit.
Steve
Who is online
Users browsing this forum: No registered users and 1 guest
