Re: Error message: "Unable to create object named WScript.Shell"
- From: "Dave Patrick" <DSPatrick@xxxxxxxxxxxxxxxx>
- Date: Mon, 6 Feb 2006 17:19:53 -0700
Change;
Set WshShell = WScript.CreateObject("WScript.Shell")
to
Set WshShell = CreateObject("WScript.Shell")
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"John" wrote:
| Hello:
|
| I use following function to execute any non-interactive commands thru VB
| Script in all my scripts.
|
| Function FUN_RunCmd(s_CmdFileName)
| Dim WshShell
| Set WshShell = WScript.CreateObject("WScript.Shell")
| WshShell.Run s_CmdFileName, 1, vbTrue
| End Function
|
| This function is working great in all my scripts without any issue. Over
| the weekend, my machine at the office was "refreshed" to newer machine.
| Now, when I run any script which uses FUN_RunCmd function, I am getting
| "Unable to create object named WScript.Shell" error message in
CreateObject
| line. I searched thru Google, but I am unable to determine what is
causing
| this error. Any assistance you could provide or put me in right direction
| to resolve this issue will be highly appreciated.
|
| Thank you in advance for the help.
|
| John
|
|
.
- Follow-Ups:
- References:
- Prev by Date: Error message: "Unable to create object named WScript.Shell"
- Next by Date: Re: Newby question - Deleting X files based on date
- Previous by thread: Error message: "Unable to create object named WScript.Shell"
- Next by thread: Re: Error message: "Unable to create object named WScript.Shell"
- Index(es):
Relevant Pages
|