Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

runtime error : '2147024894(80070002)':

1,352 views
Skip to first unread message

nuti

unread,
Jan 18, 2006, 6:24:40 AM1/18/06
to
hi folks..
wheni m trying to run my vba im gettin this run time error at this
line..


lRet = objWSH.Run(sCmd, 0, True)


runtime error : '2147024894(80070002)':
method "Run" od object 'Iwshshell3' failed.


snippet of the code...
-------------------------------------------------------
----------------------------------------------------
Set objWSH = CreateObject("WScript.Shell")
--------------------------------------------------------
sCmd = "DNSCMD " & strDNSServer & " /recordadd " & strDNSZone & " " &
strAlias & " " & strtype & " " & strIPAddr
LogToLog "running:" & sCmd
lRet = objWSH.Run(sCmd, 0, True)


If lRet = 0 Then
LogToLog "successfully created DNSAlias " & strAlias & " for
IP-address " & strIPAddr & " on " & strDNSServer & "." & strDNSZone &
"."
Else
LogToLog "*** !!! Error by DNSAlias creation " & strAlias & "
for IP-address " & strIPAddr & " on " & strDNSServer & "." & strDNSZone

& "."
lCountErrors = lCountErrors + 1
End If


cheers,
Nuti

Michael Harris (MVP)

unread,
Jan 18, 2006, 7:48:24 PM1/18/06
to
nuti wrote:
> hi folks..
> wheni m trying to run my vba im gettin this run time error at this
> line..
>
>
> lRet = objWSH.Run(sCmd, 0, True)
>
>
> runtime error : '2147024894(80070002)':
> method "Run" od object 'Iwshshell3' failed.
>

80070002 -> 8007 means a win32 error (0002 hex in this case)

0002 hex = 2 decimal (win32 error are doumented by decimal value)

System Error Codes (0-499) constant [Base]
http://msdn.microsoft.com/library/en-us/debug/base/system_error_codes__0-499_.asp?frame=true

ERROR_FILE_NOT_FOUND
2 The system cannot find the file specified.


Is DNSCMD installed and directory in the PATH...?


>
> snippet of the code...
> -------------------------------------------------------
> ----------------------------------------------------
> Set objWSH = CreateObject("WScript.Shell")
> --------------------------------------------------------
> sCmd = "DNSCMD " & strDNSServer & " /recordadd " & strDNSZone & " " &
> strAlias & " " & strtype & " " & strIPAddr
> LogToLog "running:" & sCmd
> lRet = objWSH.Run(sCmd, 0, True)
>
>
> If lRet = 0 Then
> LogToLog "successfully created DNSAlias " & strAlias & " for
> IP-address " & strIPAddr & " on " & strDNSServer & "." & strDNSZone &
> "."
> Else
> LogToLog "*** !!! Error by DNSAlias creation " & strAlias & "
> for IP-address " & strIPAddr & " on " & strDNSServer & "." &
> strDNSZone
>
> & "."
> lCountErrors = lCountErrors + 1
> End If
>
>
> cheers,
> Nuti

--
Michael Harris
Microsoft MVP Scripting


nuti

unread,
Jan 19, 2006, 3:53:20 AM1/19/06
to
hi Micheal..

Infact DNSCMD is not installed.

i am newbie...and i even donno that we need dnscmd.exe for dnscmd .

Is not available by default in 2003 server?

thanks alot...

cheers,
Nuti

Michael Harris (MVP)

unread,
Jan 20, 2006, 12:07:46 AM1/20/06
to
nuti wrote:
> hi Micheal..
>
> Infact DNSCMD is not installed.
>
> i am newbie...and i even donno that we need dnscmd.exe for dnscmd .
>
> Is not available by default in 2003 server?

Don't know what comes with 2003 server...

I have it on my XP sp2 box by way of

Download details: Windows XP SP2 Support Tools for Advanced Users
http://www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38&displaylang=en

0 new messages