• 0
Sign in to follow this  
Romero Dias

Wscript - Acesso Negado

Question

Bom Dia pessoal!

Bom, estou com esta função que dispara um ping,

mas da um erro de acesso negado, já revisei todas as permissoes de execusao de script e nada,

algum tem alguma dica ai ou já conseguil fazer alguma coisa com wscript?

Tipo de erro:

WshShell.Exec (0x80070005)

Acesso negado.

/projetos/sistema/intranet/ping.asp, line 8

Public Function Ping(IP) 

Dim WshShell, oExec 
Set WshShell = CreateObject("WScript.Shell") 

Set oExec = WshShell.Exec("ping " & IP)

If Not oExec.StdOut.AtEndOfStream Then 
sText = sText & oExec.StdOut.ReadAll() 
End If 
Response.write(sText) 
End Function 

Call ping("127.0.0.1") 

vlw ..

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

caro amigo Bareta,

eu desabilitei o wscript com o comando

regsvr32 -u wshom.ocx

e registrei de novo : regsvr32 wshom.ocx

mas continua dando erro de acesso negado

ai eu dei permissão na chave de registro

[HKEY_CLASSES_ROOT\wscript.shwll]

mas também deu na mesma, o erro continua,

teria mais alguma alternativa ?

vlw. pela ajuda,

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this