Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


April 01, 1998

Supplement: The WSH Bug


RSS
Subscribe to Windows IT Pro | See More Task Automation Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    NT Gains Scripting Muscle, Questions, Answers, and Tips About SQL Server, Title Title Title Title

You’ve checked out the Windows Scripting Host (WSH) URL (http://www.microsoft.com/msdn/sdk/inetsdk/help/wsn/wobj.htm) and decided to give WSH a try. You download and install it and try to run one of the small sample scripts. To your surprise, you get the error you see in Screen A. You refer back to the documentation and are disappointed to read, "Microsoft Internet Explorer version 3.0 must be installed in order to use Windows Scripting Host. WSH relies on the Visual Basic Script and Java Script engines provided with Microsoft Internet Explorer 3.0."

Unfortunately, your company uses America’s other favorite browser. You’d prefer not to load an additional 20MB browser on every workstation to use a 1.5MB scripting engine.

As it turns out, the problem has nothing to do with JScript and VBScript engines. WSH includes both. The problem is a dependency on urlmon.dll and shlwapi.dll—DLLs that WSH does not include. Urlmon.dll is the OLE 32 Extensions for Win32 DLL that provides support for URL monikers. Shlwapi.dll stands for Shell Lightweight Utility Library, which provides additional URL support.

Both wscript.exe and cscript.exe are linked to urlmon.dll, which is linked to shlwapi.dll. When you execute either WSH execution host, it attempts to load these two libraries whether or not your script uses URLs. You can verify this scenario on a machine that doesn’t contain Internet Explorer (IE) or Internet Information Server (IIS) if you type cscript.exe or wscript.exe at a command prompt without a script argument. You can also graphically view the dependency tree using the Microsoft Windows NT Server 4.0 Resource Kit Dependency Walker utility.

Microsoft has confirmed this DLL problem is a bug that the company will address. In the meantime, if you want to use WSH, and IE is not an option, you can copy the two DLLs to the %SystemRoot%\system32 directory and restart your machine. Or you can install IE 3.0 or later and then uninstall it, which fails to remove the two shared DLLs.

End of Article



Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...


Task Automation Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Check out our list of Free Email Newsletters!

Task Automation eBooks Spam Fighting and Email Security for the 21st Century

A Guide to Windows Certification and Public Keys

Keeping Your Business Safe from Attack: Patch Management

Related Task Automation Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement