Automation : Windows Script Host Object Model

Angelo
Member Posts: 180
Hi,Navision Master
I use COM component (Automation) built in Navision : Windows Script Host Object Model but have problem. Some PC can run the COM successfully but some other PC can not. when I check it there is no class WshShell in Windows Script Host Object Model. What the problem? Windows?Service Pack? or I must download it and register it again in Navision?Where website address I can download Navision Com component?
Regards,
Angelo
I use COM component (Automation) built in Navision : Windows Script Host Object Model but have problem. Some PC can run the COM successfully but some other PC can not. when I check it there is no class WshShell in Windows Script Host Object Model. What the problem? Windows?Service Pack? or I must download it and register it again in Navision?Where website address I can download Navision Com component?
Regards,
Angelo
0
Comments
-
There is problem, that there is difference between Win XP and Win 2k etc... if you add the class under Win XP, you will not run it on Win 2k etc... but there is solution... under Win XP there is this class: "'Windows Script Host Object Model'.IWshShell_Class" but is not listed in Navision... Under Win 2k you can see it... workaround is to export the object into text and overwrite the GUID to this (if you do not have Win 2k):
Automation "{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} 1.0:{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}:'Windows Script Host Object Model'.IWshShell_Class";
0 -
The problem will be that some PC's uses WinXp, and others Win2000. So you need 2 codeunits: one for each Windows version (and the automation variable points to a different Automation Server).
You can use the Virtual Table 2000000046 Automation Servers to check what Automation Server is installed on a particular PC. This to determine which Codeunit you need to run (the WinXP version or the Win2000 version). The function fctIsOCXDLLInstalled in the How To: How To install an OCX/DLL on the client's PC when needed (at run-time)? uses this technique.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Luc Van Dyck wrote:The problem will be that some PC's uses WinXp, and others Win2000. So you need 2 codeunits: one for each Windows version (and the automation variable points to a different Automation Server).
Yes, it is one solution. My solution are using our customers without problems on WIn2k3 terminal server, on Win XP, etc. It is only about the class, not the library... :-)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions