Scripting object models

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Scripting object models

Post by agibsonsw »

Hello.
Can someone tell me the difference between the Microsoft Scripting Runtime, and Windows Script Host? They seem to offer similar functionality
and I'm curious as to which one is preferred when referencing it in VBA.
Thanks, Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

User avatar
HansV
Administrator
Posts: 78237
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Scripting object models

Post by HansV »

Roughly speaking, the Windows Script Host is a superset of Microsoft Scripting Runtime.

Microsoft Scripting Runtime offers the Dictionary object and the FileSystemObject with its associated objects such as Drive, Folder, File and TextStream.

Windows Script Host offers all of these plus support for network functions, shell objects such as shortcuts to files, and the Windows registry.

So if you want to use a Dictionary object or the FileSystemObject, it's sufficient to add a reference to Microsoft Scripting Runtime. If you need the extra functionality, set a reference to Windows Script Host.
Best wishes,
Hans

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Re: Scripting object models

Post by agibsonsw »

So there's no technical difference in their behaviour. Thanks, Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.